Is there a sleep/wait javascript function for firefox?
I need to suspend processing in my script for a few seconds, and i am not sure how.
Thanks, sj
Related Article: javascript function returning undefined variable
is a solved JavaScript / DHTML / AJAX discussion thread by spowel4 that has 2 replies, was last updated 1 year ago and has been tagged with the keywords: javascript, function, undefined.
Sailor_Jerry
Junior Poster in Training
88 posts since Aug 2005
Reputation Points: 13
Solved Threads: 2
Skill Endorsements: 0
There is no "sleep" or "wait" operator in JavaScript. You can set a timer, though, and when the timer expires, it will execute a function.
setTimeout("alert('hello')",1250);
You could have it wait so many milliseconds, and then execute an empty procedure, I suppose.
tgreer
Made Her Cry
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
Skill Endorsements: 1
Just what i needed.
Thanks guys, sj
Sailor_Jerry
Junior Poster in Training
88 posts since Aug 2005
Reputation Points: 13
Solved Threads: 2
Skill Endorsements: 0
Old thread... It's annoying to see old thread gets revived for nothing... Also, I usually use setTimeout() function to deal with sleep/wait anyway.
Taywin
Posting Maven
2,633 posts since Apr 2010
Reputation Points: 275
Solved Threads: 375
Skill Endorsements: 17