General discussion

Locked

Creating a JavaScript that will Open IE and go through a list of web pages

By sgilmour ·
I have a JavaScript that works with IE but after a while on Windows XP it times out and tells me Internet Explorer cannot display the web pages. Any Ideas or does anyone have a better script that will work on XP with IE6
Here is what it does.
1. Open with IE
2. Select Start
3. Open first web page then opens second, third fourth etc every 45 seconds then will start back at the first web page and open pages continuously. Plus I was wondering if there is a way to clear the cache on the PC using this script.

<html>
<SCRIPT TYPE="text/javascript">
<!--
var sites = new Array();
var siteCount=0;
var start = false;
var delayInSeconds =45;

sites[siteCount++] = "www.nesn.com";
sites[siteCount++] = "www.foxsports.com";
sites[siteCount++] = "www.boston.com";
sites[siteCount++] = "www.espn.com";
sites[siteCount++] = "www.cnn.com";
sites[siteCount++] = "www.weather.com";
sites[siteCount++] = "www.abc.com";
sites[siteCount++] = "www.cbs.sportsline.com";
sites[siteCount++] = "www.msnbc.com";
sites[siteCount++] = "www.wmur.com";
sites[siteCount++] = "www.cbs.com";
sites[siteCount++] = "www.mlb.com";
sites[siteCount++] = "www.enterasys.com";
sites[siteCount++] = "www.nbc.com";
sites[siteCount++] = "www.wzlx.com";
sites[siteCount++] = "www.space.com";
sites[siteCount++] = "www.nepatriots.com";
sites[siteCount++] = "www.nyse.com";
sites[siteCount++] = "www.tvguide.com";
sites[siteCount++] = "www.nfl.com";
sites[siteCount++] = "www.nba.com";
sites[siteCount++] = "www.microsoft.com";
sites[siteCount++] = "www.moneycentral.msn.com/investor/market/home.aspx?pkw=stock&vendor=google&ocid=iSEMGoogle&refcd=go206675s_stock&tsacr=go558918480";
sites[siteCount++] = "www.usatoday.com";
sites[siteCount++] = "www.rock101fm.com";
sites[siteCount++] = "www.whdh.com";
sites[siteCount++] = "www.sports.yahoo.com";
sites[siteCount++] = "www.bostonredsox.com";
sites[siteCount++] = "www.wbz.com";
sites[siteCount++] = "www.wzid.com";
sites[siteCount++] = "www.myfoxboston.com";
sites[siteCount++] = "www.nasa.gov";
sites[siteCount++] = "www.nasdaq.com";
sites[siteCount++] = "www.bostonceltics.com";
sites[siteCount++] = "www.movietickets.com";
sites[siteCount++] = "www.noaa.com";
sites[siteCount++] = "www.theremyreport.com";

var sitesIndex=0;

function timingex( ){
setTimeout("refreshTop();",delayInSeconds*1000);
}
function refreshTop()
{
setTimeout("refreshTop();",delayInSeconds*1000);
if (start)
{
if (sitesIndex >= siteCount)
sitesIndex = 0;
var myRef = window.open('http://'+sites[sitesIndex++],"myWind", 'left=20,top=20,width=500,height=500,toolbar=1,resizable=1');
}
}

// -->
</SCRIPT>
</head>
<body onload='javascript:timingex();' bgcolor='#070A19'>
<button onClick='start = !start; ' id='startStopButton'>Start</button>
</body>

</html>

This conversation is currently closed to new comments.

0 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Back to Browser Forum
0 total posts (Page 1 of 1)  

Related Discussions

Related Forums