Hey hows it going?
I'm having some javascript issues, i'm not that good at the language yet but need to get this stuff online. Basically, i need a site that will cycle through a list of sites in a certain amount of time. Here is the stuff I have so far, along with the script i have found on the web (thanks to some of you to some of the guys on arstechnica) that can do this, but not the way I want to. I need to know how to modify it to do what I need it to (you'll understand in a minute.)
OK, first the sites:
SITE TIME I WANT IT TO STAY THERE
index.htm 6sec
att_page_14.htm 6sec
lindens_page.htm 6sec
NFL.htm 12sec
lindens_page_2.htm 6sec
NHL.htm 12sec
att_page_.htm 6sec
ccp_1.htm 6sec
# I want the above to cycle through for about 5-6 minutes, then come up with the following:
att_page_1.htm 1sec
att_page_2.htm 1sec
att_page_3.htm 1sec
att_page_4.htm 1sec
# that goes on to page 13, then page 14 looks like this:
att+page_14.htm 6sec
So basically, they'll go through the first lot of sites for five to six minutes, then the second batch will go through once, then the first for five or six minutes, then the second goes through once, etc etc.
Now, here is the script I have:
<HTML>
<FRAMESET ROWS="5%, 95%">
<FRAME NAME="Loader" SRC="loader.htm">
<FRAME NAME="LoadInto" SRC="http://www.yahoo.com">
</FRAMESET>
</HTML>
loader.htm
code:
<HTML>
<script language="JavaScript">
SwitchSpeed = 15000; // milliseconds between page loads
ListSize = 5; // number of items in the array
LoadList = new Array(ListSize);
LoadList[0]="http://www.borland.com";
LoadList[1]="http://www.microsoft.com";
LoadList[2]="http://www.arstechnica.com";
LoadList[3]="http://www.slashdot.org";
LoadList[4]="http://www.yahoo.com";
UpTo=-1;
LoadNext();
function LoadNext()
{
if (UpTo==(ListSize-1)) {
UpTo=0;
} else {
UpTo++;
};
parent.LoadInto.location=LoadList[UpTo];
window.setTimeout('LoadNext()', SwitchSpeed);
};
</script>
</HTML>
Obviously it is not modified to my stuff yet, but basically what i need to know is: how do I get it to do different times for specific sites? Thanks to anyone who can help!
-Shade
I'm having some javascript issues, i'm not that good at the language yet but need to get this stuff online. Basically, i need a site that will cycle through a list of sites in a certain amount of time. Here is the stuff I have so far, along with the script i have found on the web (thanks to some of you to some of the guys on arstechnica) that can do this, but not the way I want to. I need to know how to modify it to do what I need it to (you'll understand in a minute.)
OK, first the sites:
SITE TIME I WANT IT TO STAY THERE
index.htm 6sec
att_page_14.htm 6sec
lindens_page.htm 6sec
NFL.htm 12sec
lindens_page_2.htm 6sec
NHL.htm 12sec
att_page_.htm 6sec
ccp_1.htm 6sec
# I want the above to cycle through for about 5-6 minutes, then come up with the following:
att_page_1.htm 1sec
att_page_2.htm 1sec
att_page_3.htm 1sec
att_page_4.htm 1sec
# that goes on to page 13, then page 14 looks like this:
att+page_14.htm 6sec
So basically, they'll go through the first lot of sites for five to six minutes, then the second batch will go through once, then the first for five or six minutes, then the second goes through once, etc etc.
Now, here is the script I have:
<HTML>
<FRAMESET ROWS="5%, 95%">
<FRAME NAME="Loader" SRC="loader.htm">
<FRAME NAME="LoadInto" SRC="http://www.yahoo.com">
</FRAMESET>
</HTML>
loader.htm
code:
<HTML>
<script language="JavaScript">
SwitchSpeed = 15000; // milliseconds between page loads
ListSize = 5; // number of items in the array
LoadList = new Array(ListSize);
LoadList[0]="http://www.borland.com";
LoadList[1]="http://www.microsoft.com";
LoadList[2]="http://www.arstechnica.com";
LoadList[3]="http://www.slashdot.org";
LoadList[4]="http://www.yahoo.com";
UpTo=-1;
LoadNext();
function LoadNext()
{
if (UpTo==(ListSize-1)) {
UpTo=0;
} else {
UpTo++;
};
parent.LoadInto.location=LoadList[UpTo];
window.setTimeout('LoadNext()', SwitchSpeed);
};
</script>
</HTML>
Obviously it is not modified to my stuff yet, but basically what i need to know is: how do I get it to do different times for specific sites? Thanks to anyone who can help!
-Shade