document.getElementById() returns element with name equal to id specified

Atom RSS

This site heavily relies on bug reports created by its readers. Anyone can report a bug and be published.

Main navigation:




Search reports by browser:

The document.getElementById() function returns an element with a name attribute that is equal to the id specified.

Test page Workaround is not included
Reported by: Chris Bloom.

Explorer 5-6 Windows, Explorer 7 beta 2, Opera | Reported on 14 September 2005.

Comments

(Add your own)

Posted by Milo van der Leij on 14 September 2005

1

In their defense: "The id and name attributes share the same name space." (http://www.w3.org/TR/html4/struct/links.html#h-12.2.3)

But that still doesn't make it right.

Posted by Olly on 14 September 2005

2

I would guess that Opera is purposely mimicking IE's behaviour, for maximum compatibility.

Post a comment

Commenting guidelines:

  1. When quoting specs, articles or your own research, please include a URL of the document.
  2. Test your stuff. When reporting browser behaviour, make sure that your report is correct.

Yes