Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with the internet browser in VFP
Message
From
12/06/2010 12:24:43
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
11/06/2010 12:53:47
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01468348
Message ID:
01468674
Views:
54
>?oBrowser.document.getElementById('fpcFindAnAddress:reverseSearch:postalCode')
>
>Member document does not evaluate to an object

It's possible that the document didn't instantiate yet. You may introduce a sleep loop, in steps of maybe 100ms, waiting for oBrowser.Document to be ready. How to decide when it's ready is another matter; there's the oBrowser's status, but you may also check for a known property of the document, in a try/catch block.

Also... since the oBrowser is a COM object, my rule of thumb is that most of the time you may get in trouble using this kind of chaining that you tried here, i.e. oBrowser.document.functionToGetTheObject("by some reference").PEMofTheObject may be just asking too much from the COM interface. The workaround which usually works is to first get a reference to the object into a variable, then use that variable:
loObj=oBrowser.document.functionToGetTheObject("by some reference")
loObj.PEMofTheObject="some value"

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform