IE7 needs to load the DOM elements first before you can run any script manipulating them on the section

So weird, but if you are to define a variable in IE 7 as follows:

var dobj = document.getElementById(’dataDiv’);

and you do so on the <head> </head> part of your page, it won’t work, unless you call the function that contains that line from the  <body onload=… so you are sure that the ‘dataDiv’ tag is already loaded on the DOM

This is because on IE 7, the body has to load that element first before it is available for javascript to manipulate it.

Leave a Reply

Your email address will not be published. Required fields are marked *