Hi,
When I am trying to inject below javascript in to IE browser.
[CODE]Step1: window.location = “http://www.google.com”
Step2: document.getElementsByName(“q”)[0].value=”Script Value”
Javascript engine executing the first step and then before the page getting navigated to “
Since the page is not completly loded, script could not able to find the text field that it has to set and throwing an error: “Internet Explorer Script Error”
I have tried “setTimeout” function, however the problem is: Browser taking the control back after the whole script is getting executed and then page is getting navigated to the page “
Here I want to execute the Step1 and then give control back to the browser from my javascript file so that browser loads the page completely and then I want to take back the control then execute the Step2.
Please guide me!!
Thanks!!