Forum Moderators: open

Message Too Old, No Replies

JavaScript bug tracking

it’s still loading or running something

         

mossimo

6:28 am on Aug 29, 2003 (gmt 0)

10+ Year Member



I have modified a script, it works but if you mouse over status bar or right click it shows a hourglass and the upper right graphic continues to spin but the status bar reads “Done”.

Obviously it’s still loading or running something. Anyone know how to track this down. Manually checking the code is out of the question since the JavaScript file being called is over 6000 lines long.

Thanks,

MonkeeSage

6:36 am on Aug 29, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Find all instances of the document.write() method and follow them by document.close(). Most people are lazy and never close the document (most people never open it with document.open() in the first place), but if you don't close it, then the DOM doesn't know that it is finished unless the write takes place before the onload event is triggered. Just add the document.close() and then it should be correct (assuming there are no other errors causing the problem).

Hope that helps
Jordan

mossimo

3:05 am on Sep 2, 2003 (gmt 0)

10+ Year Member



Thanks MonkeeSage document.write() wasn't the problim but you got me looking in the right place. It was an onload event that refrenced an incorectly coded functin. oops!