Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jan 2013
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Question setTimeout freezing

    I've got a fairly simple javascript website which some of the time works perfectly, but every few attempts it will freeze on this command...

    setTimeout(partner2, 3000);

    If anyone knows why this would happen, and why it only sometimes happens, i would greatly appreciate it!

    Thanks all.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,151
    Thanks
    203
    Thanked 2,548 Times in 2,526 Posts
    A second instance of setTimeout() called while the first is still active? (Within 3 seconds).

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #3
    New to the CF scene
    Join Date
    Jan 2013
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Philip M View Post
    A second instance of setTimeout() called while the first is still active? (Within 3 seconds).
    I use quite a few setTimeout() commands in my code. But only in different functions so I'm not sure how they could conflict with each other.

  • #4
    New to the CF scene
    Join Date
    Jan 2013
    Posts
    9
    Thanks
    2
    Thanked 0 Times in 0 Posts
    These functions are sort of on a loop, but each connecting to the others using setTimeout commands.

    The completion of the 4 functions are looped 10 times and has frozen on different loops and even not at all, but when it does it's always at the same stage (eg. from function 2 to function 3).


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •