View Full Version : IE crashes :(

04-27-2008, 12:33 PM

The web browser IE crashes when visiting my weblog (http://www.florisweijenburg.nl). It should be a JavaScript problem... but when i'm using Firefox, firebug doesn't report any Javascript error.... So what's going on?

I hope someone can help me with finding the problem.:thumbsup:


My JS handler doesn't seem to append the last Javascript file from the files array. So the for loop is acting stange... (Inspect with firebug to find out) how could this be? :S

04-27-2008, 03:00 PM
Are you calling this code directly in the head? Or are you calling this in the body or onload?

IE can not append a new element to a div before the closing tag

This will error

JS append head here

these will not error

window.onload JS append head here


JS append head here


04-27-2008, 04:02 PM
Thanks A1ien51.

When I used your second method I had some problems with function that where being called on the pages. (Because the Javascripts where added AFTER the page was loaded).

So now I am appendding my JS to the body tag, and that works fine. But it's not a very sexy thing to do...

04-27-2008, 04:15 PM
There is no need to use the onload in the body tag

<script type="text/javascript">
window.onload = function(){