Logic’s Last Stand

November 7, 2008

Damn it, IE

Filed under: Computers — Tags: , , — Zurahn @ 11:51 pm

So the API for document.getElementById in Internet Explorer 7 and prior returns for and ID or a name. Meaning
<input type="text" value="1" name="iesucks" />
<script>alert(document.getElementById(‘iesucks’);</script>

alerts a value of ‘1’ no problem. Oh, and guess what, it’s not case sensitive either!

Hooray, so then that means if you have, oh say, a META tag like so
<meta name="Description" content="The ultimate IE Sucks blog" />

and an input box such as
<input type="text" id="description" value="IE SUCKS!" />

suddenly document.getElementById(‘description’).value returns ‘undefined’ because it’s looking for a value attribute in the META tag. Brilliant, IE devs, damned brilliant.

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: