I need a script that will open multiple web pages in Internet Explorer with the last tab being the active one. I do not know the Javascript language but I found the following script that almost does what I want:
If I execute the above code in a “StartIE.js” file, although the code opens google and yahoo in separate tabs in the same Internet Explorer Window, it leaves google as the active tab. I want yahoo (the 2nd tab) to be active.
The actual purpose for this is because of a strange action that is happening for a webpage that I am working with that is opened via a url with a number parameters via Oracle code. When the page loads in Internet Explorer, the url address box changes to a simplified form of the url dropping out the parameters.The Oracle code periodically issues a page refresh but it then refreshes with the url without the parameters so the page does not get displayed properly. As a workaround, I discovered that if you open the same url again in another tab, the parameters remain in the url box so it will get refreshed properly. Therefore, I need a script to open the url twice in separate tabs but have the second tab as the active tab.
What do I need to change in the above script so that the second tab (in this case, yahoo) is the active tab (not the background tab).
Thanks to anyone who can help me out.
JavaScript:
var navOpenInBackgroundTab = 0x1000;
var objIE = new ActiveXObject("InternetExplorer.Application");
objIE.Navigate2("[URL unfurl="true"]http://www.google.com");[/URL]
objIE.Navigate2("[URL unfurl="true"]http://www.yahoo.com",[/URL] navOpenInBackgroundTab);
objIE.Visible = true;
If I execute the above code in a “StartIE.js” file, although the code opens google and yahoo in separate tabs in the same Internet Explorer Window, it leaves google as the active tab. I want yahoo (the 2nd tab) to be active.
The actual purpose for this is because of a strange action that is happening for a webpage that I am working with that is opened via a url with a number parameters via Oracle code. When the page loads in Internet Explorer, the url address box changes to a simplified form of the url dropping out the parameters.The Oracle code periodically issues a page refresh but it then refreshes with the url without the parameters so the page does not get displayed properly. As a workaround, I discovered that if you open the same url again in another tab, the parameters remain in the url box so it will get refreshed properly. Therefore, I need a script to open the url twice in separate tabs but have the second tab as the active tab.
What do I need to change in the above script so that the second tab (in this case, yahoo) is the active tab (not the background tab).
Thanks to anyone who can help me out.