>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.
I have read the whole thread. Apart from an extra quotation mark at the end of the offending line (which may have come while you were typing the message, I'll ignore it)... sounds like a timing issue. How about issuing a dodefault(), and maybe a doevents() before setting this .disabled property? I don't really know when does navigatecomplete2 fire, exacrly
after the page has finished loading, or is there some slight delay.
Another thing - unless the layout of your pages prohibits this - is that if you're creating those pages from VFP, so you're in control, why do you have the link to home on the page you show when you're home? Couldn't you just (re)generate that part as well, with the link to the location where you're currently navigating to being omitted?