Trying to execute javascript in a web browser

byle

Member
Joined
Dec 11, 2006
Messages
7
Programming Experience
1-3
Hi!!

I'm trying to create an app to get all the links (and webpages from that links) from a concrete website. All the html links (<a href......) I get correctly. The problem is when the link is located in a javascript methdI've created a webbrowser and I call the

VB.NET:
wb.document.InvokeScript()

method to invoke the script function I want. The case is that the script i try to invoke does not return any results. Instead it redirects my browser to another url.
I use do events like this to wait until the new page is loaded in the webbrowser.

VB.NET:
 Do While mDocumentCompleted = False
Application.DoEvents()
Loop
The mDocumentCompleted is changed in the "DocumentCompleted" event from the webbrowser

The problem is that doEvents makes me wait for a minute until it returns from this function. And one minute is a whole life for what I try to do....

Does anyone know any other way to wait until my browser loads the new url obtained with the invokeScript????

THANKYOU!!!!
 
Back
Top