Fri Dec 29, 2006
Interesting Cross-Browser Tidbit: Letter Case in ID Names
If you do a document.getElementById() on an object whose ID has the exact same letters but doesn't match the case of the object's declared ID, it should fail, right? Depends on the browser.
Here's what really happens:
IE 6.0: It works anyway! It appears to make the ID case-insensitive so the access will succeed. Typical of ID, the "forgiving browser".
Firefox 1.0/ Netscape 7.0:
It fails as it should, giving the error "Object has no attributes".
Go figure...
[0] comments (5917 views) | [123] Trackbacks [0] Pingbacks
| Servers provided by | ![]() |






