[Javascript] Pause execution for 2 seconds

Peter Brunone peter at brunone.com
Fri Jan 7 02:30:04 CST 2005


Roger,

   Who publishes that book?  I've heard all about Danny Goodman's Javascript Bible, but that one's new to me. I'd love a good reference that isn't as cumbersome as the W3C site.  http://msdn.microsoft.com/scripting is good for IE (and often others), but unfortunately that doesn't always cover it all.

   Oh, and your script is correct (at least according to my sleep-deprived eyes and pint-of-Wexford's-Irish-Cream-Ale-addled brain).

Cheers,

Peter

 From: Roger Roelofs rer at datacompusa.com

Tim,

On Jan 6, 2005, at 8:07 PM, Tim Burgan wrote:

> Hello,
>
>
> I'm wondering how I can pause or hold javascript execution for 2 
> seconds.
>
> I have a web page that displays a message, then after 2 seconds I want 
> the window to close.
>
> Can someone please forward me in the right direction as to where I 
> find out how to do something like this.

This is from memory, so double-check me...

function closeWin() {
// close the window...
}

setTimeout('closeWin()', 2000);

> PS. In PHP, they have an excellent official online manual, and Java 
> has their API.. does JavaScript have a similar type of documentation?

Not that I know of. I always just look in 'Javascript: The Definitive 
Guide' It's a bit dated (at least my copy is :) ) but handy.

hth

Roger,

Roger Roelofs
Datacomp Appraisal Services

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20050107/8ac5707f/attachment.html>


More information about the Javascript mailing list