![]() |
|
|
+ Search |
![]()
|
Apr 4th, 2008 21:14
ha mo, Dave Clark, Colin Fraser, Michel Petrovic,
Try this:
<script language="JavaScript"><!--
function doWhatever() {
//do what you want here
//use the code but nils illegitimati carborundum
}
function setupDelay() {
setTimeout('doWhatever()',10000);
}
setupDelay(); // start the function
//--></script>
This should delay the executon of the doWhatever() function for 10
seconds.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Michel,
Perhaps you're referring to being able to pass an object within the
setTimeout() process. The following example will execute the
specified object's method after a one-second delay:
window.setTimeout(function() { myObject.myMethod() }, 1000);
Take care,
Dave Clark
www.DaveClarkConsulting.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com