IEs support for the DOM sucks
Nov. 14, 2006 2 Comments Posted under: Development, Hijax, JavaScript
Again I find myself running into problems with IE, today its with it’s DOM support.
I recently wrote some JavaScript to look at a links href attribute to detect if the link was external or not (the existence of HTTP:// would show it was external). The problem was that Internet Explorer showed the absolute href rather than the text content of the attribute in the DOM. Therefore it meant that every link had HTTP:// in it’s href attribute.
I discovered that you could pass a section option in the JavaScript for .getAttribute that would force IE to return the value of the href in the DOM rather than how it saw it. This was found via Glenn Jone’s post on Internet Explorers getAttribute href bug.
Another day another IE work around… sigh
This entry was posted on Tuesday, November 14th, 2006 at 6:23 pm and is filed under Development, Hijax, JavaScript. You can leave a comment and follow any responses to this entry through the RSS 2.0 feed.
Just design specifically for IE. Most internet users have it, and if it doesn’t work for them then your site is rubbish. Don’t fight it. Don’t hate it. It’s just IE, and what the world looks at the internet through.
Coding using web standards is the only way to code mate. Look at the changed form IE6 to 7 and the way things are going they are going to need to make more soon. Standards are the only way you know your code is not redundant!