Solved

problem opening multiple web pages in multiple tabs in IE7

Posted on 2009-05-08
2
360 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

#Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
This is about my first experience with programming Arduino.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

733 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