By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,453 Members | 959 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,453 IT Pros & Developers. It's quick & easy.

SetTimeout Problem again - Please Help

P: 30
Here is my code - I want Function test to execute only after 5 seconds.

Expand|Select|Wrap|Line Numbers
  1. function test(){
  2. alert("After 5 sec");
  3. }
  4.  
  5.  
  6. function  f2(){    
  7. setTimeout(test,500);    
  8. }
Problem is - Instead of 5 seconds delay - this program gives about 2 secods delay - which is very wired.

Please Help Thanks,
Apr 11 '08 #1
Share this Question
Share on Google+
1 Reply


P: 30
I got it thanks - i was putting 500 instead of 5000


funny
Apr 11 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.