Solved

problem opening multiple web pages in multiple tabs in IE7

Posted on 2009-05-08
2
358 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
ID: 24338249
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
ID: 31579545
Perfect, thanks.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

773 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