This doesn't always work out however and I find myself writting css pages, javascript etc...
Anyway the problem. Looks like a bug in IE. It appears that the
document.getElementById()
function does not work... However on further examination it turns out that the ID attribute must be the first (or before most atribute) attribute in an html element.For example
<img class="myimg" name="myimg" src="myimg.jpg" id="12"/>
If you then try to access this in javascript it doesn't work
docuemnt.getElementById("12") returns a null.
However if you re-jig the element so id is the first attribute then it works fine.. Bizarre.
<img id="12" class="myimg" name="myimg" src="myimg.jpg" />
[tested on IE 6.02]
No comments:
Post a Comment