Click to See Complete Forum and Search --> : delayed function


obviousunknown
04-15-2003, 06:19 PM
How can I load a function after a given amount of time from another function, after the first function loads.



function loadme()
{
This should be completed first

do something here

then load function loadlater (setTimeout or something)
}

function loadlater()
{
This should be completed last.
}

khalidali63
04-15-2003, 06:27 PM
setTimeout("secondFunction()",seconds *1000)
the timer counts in millisecs,therefore if seconds =3
then delay will 3*1000 = 3000 which is 3 seconds delay

Hope this helps

Cheers

Khalid