Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with the internet browser in VFP
Message
De
12/06/2010 12:24:43
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
11/06/2010 12:53:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01468348
Message ID:
01468674
Vues:
52
>?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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform