Click to See Complete Forum and Search --> : Delay in a function


YoN
01-09-2003, 10:51 AM
Hi,
Is there a way to set a delay timer within a function?
I want a function to execute a few lines then wait some seconds and then go ahead with the others lines till the end.
Thanks,

[YoN]

swon
01-09-2003, 10:58 AM
use the setTimeout("yourfunction()",yourSpeed) method for that.

YoN
01-09-2003, 11:08 AM
Thanks Swon but that will run the entire function. :(
what i want is to set a timer in the function. is there a way? or should i use two functions?

swon
01-09-2003, 11:11 AM
it's probably better to use a seperate function.