Connecting Tech Pros Worldwide Forums | Help | Site Map

SetTimeout Problem again - Please Help

Newbie
 
Join Date: Jun 2007
Posts: 29
#1: Apr 11 '08
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,

Newbie
 
Join Date: Jun 2007
Posts: 29
#2: Apr 12 '08

re: SetTimeout Problem again - Please Help


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


funny
Reply