Click to See Complete Forum and Search --> : JavaScript Guru needed


Cerf
05-19-2003, 12:52 PM
Yo yo yo,

In bash scripting I can use the sleep command to basically pause the script, whats the JavaScript equivilant (Pardon the spelling)

joelc
05-19-2003, 01:00 PM
I don't think you can just 'pause' and then continue. Most of the time when you need to do something like that (like wait x number of seconds before advancing to the next picture in a slide show) you would set a timer and then have the timer call a function when it goes off. For an example of how to do that, you can look at the example I did last month for my roommate's wedding here:
http://hedyd4me.netfirms.com/cookwedding/

DragonHead
05-19-2003, 01:06 PM
You might be able to do what your wanting with the "Window.setTimeout()" function.

Cerf
05-19-2003, 03:57 PM
Essentially, what I'm trying to do is - when the user mouses over a link a picture changes, and there are also many links for the user to look at. If the user doesn't mouse over a link for 30 sec the pictures will start changing themselves at a set interval in time. (Keep in mind that when the pictures start to change them selves, the user can still mouse over something to over ride the picturese)

Is there an online database of all this JavaScript magic that I can look at, similarly to the one found at www.php.net ??

joesbox
05-19-2003, 06:19 PM
have you taken a look at http://www.javascript.com ? this may be what you are looking for as far as a database for javascript.