Overriding IE's getElementById() | JavaScriptSource

Overriding IE's getElementById()

Max Wilson Mar 3, 2008

General

There is a well-known bug in the Internet Explorer implementation of the getElementById() method, which, contrary to the W3C standard, allows the method to return an element even if only the element's name attribute matches the requested id. This snippet will easily correct that problem.


Notes

Further details available on the Web site.

Source Code

Paste this source code into the designated areas.

External file

Paste this code into an external JavaScript file named: overridingIE.js


Head

Paste this code into the HEAD section of your HTML document.


Leave a Response

(0 comments)