Click to See Complete Forum and Search --> : Problems with opening windows


ssj4opie
09-04-2003, 09:43 AM
I need help with this code .....I am still having problems....

I want it to open browser windows for each website in an array in 5min25sec intervals

I want them to open in the order of the array

can someone help me it would be really appreaciated!!

http://www.geocities.com/goldwing64_2001/jsintext

that is the website where the script is....in text

this is the website where it is suspose to run


http://www.geocities.com/goldwing64_2001/thugbuilder

if at all possible tell me the problem and what I can do about it. or other possible ways of writing the code differently.

Again thanks for all the help!!

pyro
09-04-2003, 10:56 AM
Try something like this out:

<script type="text/javascript">
sites = new Array("http://www.webdevfaqs.com","http://www.infinitypages.com","http://www.w3c.org");
seconds = 325; //number of seconds to wait
x = 0;
function changePage() {
window.open(sites[x]);
x++;
if (x < sites.length) {
setTimeout("changePage()",seconds*1000);
}
}
setTimeout("changePage()",3000);
</script>Note that a script like this could very easily become very annoying, so you might want to re-think doing it.