The following will pop up an alert dialog EVERY 20 (20000 milliseconds) seconds:
window.setInterval(function(){alert('Hello!');},20000); The following will pop up an alert dialog ONCE, AFTER 20 (20000 ms) seconds: window.setTimeout(function(){alert('Hello!');},20000); To keep your site "updated" you would use setInterval, as it will be called continuously. - jake On Mon, Apr 7, 2008 at 11:53 AM, coughlinsmyalias <[EMAIL PROTECTED]> wrote: > > Hey, I found this article here: > > http://www.evolt.org/article/Using_setInterval_to_Make_a_JavaScript_Listener/17/36035/ > - to try to clear up my confusion with setInterval and setTimeout, but > still kind of confused, but this is what I got out of it so far: > > > setInterval: Does X every X ms > > setTimeout: Delays X every X ms > > Is that close or am I completely off? If someone has a more clear > example could you post it :) > > Also, if I want to try to keep my site as "live" and "updated" as > possible, which would be better. > > Thanks, > > Ryan >