Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Readystate and member does not evaluate to an object
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Titre:
Readystate and member does not evaluate to an object
Divers
Thread ID:
00963939
Message ID:
00963939
Vues:
74
Hello,

I'm using a webbrowser Activex control to do some tasks : navigate to a website, fill a form and login. After this I want the webbrowser to click a hyperlink, but the problem is that the code generates an error: "Member does not evaluate to an object". Very strange because the document.readystate after the login is equal to "complete" and the owebbrowser.readystate is equal 4. So the rendering of the document is complete, I don't understand the error. I have the following code, could someone help? Thank you
cGebruikersnaam = "abracadabra"
cPassword = "hocuspocus"
cUrl = "https://securesitefiction.nl"

THISFORM.oWebBrowser.Navigate(cUrl)
dc =THISFORM.oWebBrowser.document

DO WHILE dc.readystate <> "complete" 

ENDDO 	


**** INVULLEN EN INLOGGEN
dc.Forms(0).item("strUserID").Value = cGebruikersnaam
dc.Forms(0).item("strPassword").Value = cPassword
dc.Forms(0).item("Inloggen").Click()


***Login
DO WHILE (dc.readystate <> "complete") 

ENDDO 	



MESSAGEBOX(dc.readystate) && gives "complete"
MESSAGEBOX(thisform.owebbrowser.readystate) && gives 4



dc.links(1).click() && error member "links" does not evaluate to an object

*just testing: 
loLinks = dc.getElementsByTagName("A")
MESSAGEBOX(lolinks.length)

FOR EACH lnk IN lolinks
 MESSAGEBOX(lnk.innerhtml)	
 IF LOWER(lnk.innerhtml) = "overschrijven"
    lnk.click()
 ENDIF 
ENDFOR 
Zakaria al Azhar
Zakaria al Azhar
My blog on Actuaris.net
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform