Just got hit with this error:
And regrettably I spent a lot of time searching through Javascript in mootools javascript, and the small 2 lines of javascript Wicket adds to the page. Finally, I decided to actually google the error (which I should have done immediately).
Low and behold, because I was inlining some Javascript for the mootools Tip plugin, Internet Explorer 6 and 7 were upset because I hadn’t given them the chance to render the entire HTML yet. Easy enough to fix, and actually cleans up the code real nice, was to either add it to the body onload, or use javascript. In my case I used mootools goodness:
window.addEvent(‘domready’, Site.start);
Gotta love Google. You can also check this site for some tips on avoiding the problem in the future (especially with GMaps).
UPDATE The site above seems to no longer be around, such is life. I’ve posted a quick update for several javascript libraries on how to ensure you are executing javascript when the DOM is finished loading.











{ 11 comments… read them below or add one }
Hi,
Can you please send me the code example of where “window.addEvent(’domready’, Site.start);” line is is included.
Thank you.
John.
Thank you, thank you! I search for quite a while trying to find the answer to this. In my case I had blocks sprinkled throughout the page. I all the javascript code into a function and that did the trick!
Anthony
can someone please tell me how to place in these codes. This has never happened to me before and I’m so confused. Please help :] I have not a clue what to do with these codes.
am having problem opening applications on face book and hi 5. my explora keeps on cutting off when it starts opening
Can someone help by telling us where and how we are supposed to add the code :
“window.addEvent(’domready’, Site.start);”
many thx
Mr. Lombardi … can you please update us on how we can fix this vexing problem? we need some examples of implementing the script … thanks
@vanni
vanni, the fix was to modify how we were implementing some of our dynamic code to get loaded only when the dom was ready. That script would be put in between script tags like normal
hi..i have the same problem…i need to fix it immediately..pls send me the code with example..
thanx
I’ve had this error message (and went nuts), but I cracked (not my head) the code, just in time.
This is what I did –> http://zeebigtourist.blogspot.com/2009/06/internet-explorer-cannot-open-internet.html
Thanks for all the helpful info.
ZeeBigTourist
Actually it is not a bug. You are just not allowed to access any DOM element before it finished rendering.
Put your JavaScript after the DIV, TABLE or any other element and you won’t see the error.
Is this problem related to number of users? We just started experiencing this in the past couple of days, with an app that has been in test for several weeks, has not changed for several weeks, but one significant change is the number of users increased by about 500, and the next day this error started happening frequently, and randomly.