[VB08] Webbroser Javascript Problem/Question

01/11/2013 23:33 MARCI1111#1
Hello guys i wrote a tool and in one part in this tool, it should open a javascript on a homepage, so:

1. step : WebBrowser1.Navigate("http://XXXXX.com")
2. step : WebBrowser1.Navigate("javascript:gp.XXXXXX")


it works without any problems and the javascript also starts without any problems, but now i wanna combine these 2 steps into 1, is something like this possible?

WebBrowser1.Navigate("http://XXXXX.com/javascript:gp.XXXXXX")

i tried it on this way but it doesnt work, is there another method to combine those 2 steps into one?


PS: only WebBrowser1.Navigate("javascript:gp.XXXXXX") doenst work, i need to navigate to the website first...

thanks & greetings,
MARCI1111
01/12/2013 01:30 »jD«#2
Why do you need to combine them? And no there isn't really a way, as the webpage for the first step has to have a valid DOM to inject the Javascript into. Which means the first website has to be fully loaded first.

-jD
01/12/2013 01:36 MARCI1111#3
i want to combine them to make it faster, but if it doesnt work anyway, np. i will find other ways to improve the speed of my tool. i already thought that the website has to be full loaded, but thanks!

greetings,
MARCI1111
01/12/2013 01:45 »jD«#4
Faster? You will have to wait for the page to load NO MATTER WHAT! The calls to navigate should be inlined and return in like 2 milliseconds.... try building in Release mode.

-jD