Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Readystate and member does not evaluate to an object
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Title:
Readystate and member does not evaluate to an object
Miscellaneous
Thread ID:
00963939
Message ID:
00963939
Views:
75
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
Next
Reply
Map
View

Click here to load this message in the networking platform