Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

updating webbrowser

Status
Not open for further replies.

Keneda88

Programmer
Oct 30, 2007
18
0
0
US
once again i am stuck.
i have to webbrowser that i navigate to a site useing webbrowser.navigate("siteurl")
after i save some values and other stuff i change the page by focusing on a button then using
sendkeys.sendwait((chr(13)) (the enter button)
the page then changes (i know it changes because i wrote a basic version just to see if the page was changing)
i then run through and grab some more values
however when i use the webbrowser.documnet.getelementbyid() it runs values from the orignal page i open with .navigate. It does not seem to be updating the webbrowser.documnet. Is there a way i have to update the webbrowser for the new site or is something else going wrong
 
I would say to use the invokemember for clicking a button, not sendkeys. Then, is the document completely loaded before you're trying to get an id on that new page?
 
i was able to fix the problem by throwing in a timer on the program. i want to use invokemember but i cant get it to work... there is javascript behind the button. (see my other thread)
 
If there is javascript you can use:

webbrowsercontrol.document.InvokeScript("scriptyouarefiring")

or

Webmycontrol.Navigate("javascript:document.links[6].click()")


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top