Affects: IE6, IE7
Fixed In: IE8
MSIE Feedback ID: 333979
"Just when you thought it was safe to go back in the water"! (credit to JAWS the movie) IE's getElementById( id ) throws another curve ball!
Although it should be according to the (spec), IE performs a case-insensitive search for IDs. This isn't likely as bad as (bug 152), but still a concern, if you have 2 IDs with different cases.
Example:
<form id="userInfo">
<input id="userid" value="grovermonster"/>
<input id="userfirst" value="Grover"/>
<input id="userlast" value="Monster"/>
<textarea id="userinfo">
Cute and cuddly and Blue!
</textarea>
<form>
<script type="text/javascript">
var infoForUser = document.getElementById('userinfo').value;
alert('Info for this user:\n\n' + infoForUser);
</script>
In IE, this won't return the "Cute and cuddly and Blue!" line you would expect. Instead, IE tries to return the value of the form itself.
Related Issues: (bug 152).