Click to See Complete Forum and Search --> : alert box corrects problem


LittleRed
10-24-2003, 07:25 AM
I've been trying to locate the source of the problem from my previous post; http://forums.webdeveloper.com/showthread.php?s=&threadid=19864

I just put the line
alert('entered function');
in to the main function and suddenly everything works perfectly (apart from bringing up an alert box every time), but if all I do is remove the alert line, it reverts to not working as it should.

has anyone noticed anything similar to this?
is there anything 'hidden' that might occur whenever an alert is called?

I'm baffled.

cheers

gil davis
10-24-2003, 07:57 AM
Usually if your code behaves when you add an alert but fails without it, it is an indication of a race condition.

LittleRed
10-24-2003, 08:02 AM
sorry, what's a race condition?

gil davis
10-24-2003, 12:49 PM
A race condition occurs any time your code tries to access an object that doesn't currently exist, but will shortly.

LittleRed
10-30-2003, 02:43 AM
thanks for your help on this. I've found where the problem was, and it was a race condition.