[Javascript] First Post etc.

Roderick A. Anderson raanders at acm.org
Mon Dec 5 16:45:43 CST 2005


This is a test also.  I expected more traffic adn I've got none since I 
signed up mid-morning.

The reason I joined is two fold.  First I'm getting ready to write a 
serious bit of Javascript for some specialized form validation. 
Currently I use fValidate for most of it but Peter seems to have fallen 
off the face of the earth.

Secondly is an issue that a friend mentioned he found that only happens 
with IE ( go figure eh :-) and we can't find any mention of when 
searching with google.

The short story is:  When a name attribute exists with the same value as 
a id attribute in a document and comes first in the DOM; Internet 
Explorer returns the element with the name instead of element with the 
id when getElementById is used.

A simple and lame example:

<html>
   <head>
     ...
   </head>
   <body>
     ...
     <div name="testing">
       ...
     </div>
     ...
     ...
     <input type="text" id="testing" />

     ...
   </body>
</html>

The div gets returned.

I have yet to test this but I trust my friend's programming skills.

Anyone else seen this?


Rod
-- 



More information about the Javascript mailing list