Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Web browser control problem
Message
De
23/05/2002 09:42:54
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Web browser control problem
Divers
Thread ID:
00660410
Message ID:
00660410
Vues:
74
Hello.

I have placed the web browser control on a VFP6.0 form and have successfully navigated to html pages that are generated in VFP at runtime. I put a Back, Forward and Home button in my html page. Notice I said on my html page and not on the VFP form. It is actually in a frame. What I want to do is to disable/enable those buttons as is appropriate. For example, if the user navigates to the Home page, I want to disable the Home button on the page.

I am using the NavigateComplete2 event of the browser object and checking the url parameter that is passed to that event. I know from the url that the user is either at the Home page or not. My problem occurs then I try to disable that button with code in the NavigateComplete2 event as follows:

"*** ActiveX Control Event ***
LPARAMETERS pdisp, url

this.document.frames(0).home.disabled = ("APP_MAIN.HTM"$UPPER(url))"

home is the name of the Home button in a frame. VFP errors out with:

"OLE error code 0x80020006:Unknown name."

If I suspend, go to the debugger and type in "this.document.frames(0).home.disabled" in the watch window, it shows ".F.". Obviously VFP knows about the object and its value. This even appears in the trace window as a tooltip when I hover over that line of code.

Does anyone know what is going wrong or what I need to do to avoid this problem? Am I using the wrong event to try to accomplish this? Any help is greatly appreciated.

TIA.

Mike
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform