Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-29-2013, 05:06 AM   PM User | #1
tomaz42
New to the CF scene

 
Join Date: Jan 2013
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
tomaz42 is an unknown quantity at this point
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.
tomaz42 is offline   Reply With Quote
Old 01-29-2013, 08:08 AM   PM User | #2
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,102
Thanks: 197
Thanked 2,421 Times in 2,399 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
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.
Philip M is offline   Reply With Quote
Old 01-29-2013, 08:49 AM   PM User | #3
tomaz42
New to the CF scene

 
Join Date: Jan 2013
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
tomaz42 is an unknown quantity at this point
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.
tomaz42 is offline   Reply With Quote
Old 01-29-2013, 10:06 AM   PM User | #4
tomaz42
New to the CF scene

 
Join Date: Jan 2013
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
tomaz42 is an unknown quantity at this point
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).
tomaz42 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:21 PM.


Advertisement
Log in to turn off these ads.