SetTimeout Problem again - Please Help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Harshpandya
    New Member
    • Jun 2007
    • 30

    SetTimeout Problem again - Please Help

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

    [CODE=javascript]function test(){
    alert("After 5 sec");
    }


    function f2(){
    setTimeout(test ,500);
    }[/CODE]

    Problem is - Instead of 5 seconds delay - this program gives about 2 secods delay - which is very wired.

    Please Help Thanks,
    Last edited by gits; Apr 12 '08, 08:55 AM. Reason: added code tags
  • Harshpandya
    New Member
    • Jun 2007
    • 30

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


    funny

    Comment

    Working...