469,281 Members | 2,486 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,281 developers. It's quick & easy.

Timer Function ??

I need a function that every 5 seconds a different web page will be called.
Where is a good reference to local something similar to this?
Jul 20 '05 #1
3 1112
> I need a function that every 5 seconds a different web page will be
called.
Where is a good reference to local something similar to this?

You may try to make it like this:

<html>
<body>
<iframe id="frameId" width="100%" height="100%" frameborder="0"
scrolling="auto"></iframe>
<script type="text/javascript">

var urlArray = new Array();

// Array of urls to rotate through
urlArray[0] = 'http://www.google.com';
urlArray[1] = 'http://www.google.de';
urlArray[2] = 'http://www.google.fr';

var urlCounter = 0;

function goToUrl() {
var idx = urlCounter % urlArray.length; //which index of urlArray to use
urlCounter ++;
document.frames['frameId'].location.href = urlArray[idx];
}

var interval = setInterval("goToUrl()",5000);

</script>
</body>
</html>

Of course this is just an examle, but I Hope this will put you on the right
track
Jul 20 '05 #2
DevBoy wrote:
I need a function that every 5 seconds a different web page will be called.


This is utter nonsense. No Internet connection that is available to
common people is nowadays that fast, unless you link only low-quality
websites. Besides, what do you tell the user who is complaining that
you force him/her to download data that he/she never requested?
PointedEars
Jul 20 '05 #3
Thomas 'PointedEars' Lahn wrote:
DevBoy wrote:

I need a function that every 5 seconds a different web page will be called.

This is utter nonsense.


You have no clue what you are talking about. Ever heard of a
news-ticker? Obviously not.

No Internet connection that is available to common people is nowadays that fast,
unless you link only low-quality websites. Besides, what do you tell the user
who is complaining that you force him/her to download data that he/she never
requested?


Can you back *any* of that up with research?

Unless the site is *very* loaded with images, I don't know of many sites
that I can't load in 5 seconds. And I have a "very available to common
people" Cable Connection, with the US Based subscriber base growing
daily. DSL connections are comparable in speed as well.

Your move stupid.

--
Randy

Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Christine | last post: by
6 posts views Thread by Antti Laakso | last post: by
1 post views Thread by jmgro | last post: by
7 posts views Thread by genesistr | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.