Solved

problem opening multiple web pages in multiple tabs in IE7

Posted on 2009-05-08
2
356 Views
Last Modified: 2013-12-08
I wrote a simple batch file to open up eight html pages. I want them to open up in multiple tabs in the same browser. I have ie set to use the tabs. When I click on the bat file it does something weird...
It opens up page one in an IE browser.
Then, it opens page two in a second browser.
Then, it just sits there, in the middle of the bat file with the cursor blinking at me stupidly.
If I close the second browser, it opens pages three through eight in the first (still open) browser.
If I close the first browser, it does nothing. I have to then close the second browser too. Then, report three opens in it's own browser. I close it. Report four opens the same way. This happens with each of the following pages. Can someone explain to me what's happening? The code is (basically) as follows:

start iexplore.exe \\server\Reports\page1.html
\\server\Reports\page2.html
\\server\Reports\page3.html
\\server\Reports\page4.html
\\server\Reports\page5.html
\\server\Reports\page6.html
\\server\Reports\page7.html
\\server\Reports\page8.html

start iexplore.exe \\server\Reports\page1.html

\\server\Reports\page2.html

\\server\Reports\page3.html

\\server\Reports\page4.html

\\server\Reports\page5.html

\\server\Reports\page6.html

\\server\Reports\page7.html

\\server\Reports\page8.html

Open in new window

0
Comment
Question by:StarbuckLives
2 Comments
 
LVL 9

Accepted Solution

by:
wellhole earned 100 total points
Comment Utility
Create a file called myscript.js and insert script below. In your batch file, just run wscript myscript.js
var navOpenInBackgroundTab = 0x1000;

var oIE = new ActiveXObject("InternetExplorer.Application");

oIE.Navigate2("\\server\Reports\page1.html");

oIE.Navigate2("\\server\Reports\page2.html", navOpenInBackgroundTab);

oIE.Navigate2("\\server\Reports\page3.html", navOpenInBackgroundTab);

oIE.Navigate2("\\server\Reports\page4.html", navOpenInBackgroundTab);

oIE.Navigate2("\\server\Reports\page5.html", navOpenInBackgroundTab);

oIE.Navigate2("\\server\Reports\page6.html", navOpenInBackgroundTab);

oIE.Navigate2("\\server\Reports\page7.html", navOpenInBackgroundTab);

oIE.Navigate2("\\server\Reports\page8.html", navOpenInBackgroundTab);

oIE.Visible = true;

Open in new window

0
 

Author Closing Comment

by:StarbuckLives
Comment Utility
Perfect, thanks.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now