views:

235

answers:

1

Right now i am calling my function on webBrowser1_DocumentCompleted. It doesn't run correctly. However when i press button2 and call the very same func it does. It seems like my code needs some time for JavaScript and Ajax to run. When event should i call my code from? i dont want to click a button every time?

A: 

Use DocumentCompleted and check the URI for the AJAX request.

acidzombie24
And did that work?
John Saunders
@John Saunders: yes but its very annoying that there are variant request. I dont know why some pages want 2 while other only needs 1. Most of the time its 2 so i'll try to figure out why some want 1 or find a workaround like a timeout for cases with one req (The uris dont help).
acidzombie24