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 "http://www.google.com"
What, in fact, is your real need? Maybe cookies might resolve it, but definitely not in this manner.
Please suggest me how to inject the above script in to IE browser.