I worked on user management scripts and everything was working like a
charm on FireFox, so I went to try it on IE6. And I had strange errors
or no effects at all when validating password on some form.

After some researching, I found I had two quite similar fields in two
different forms:

<input name="passwd" type="password" id="loginPasswd" />

and few lines forward in second form:

<input name="passwd" type="password" id="passwd" />

When I wanted to work on the second field (id=passwd) I had strange
outputs on IE6, so I did:


and I got an answer about <input name="passwd" id="loginPasswd" /> ...

In FireFox, everything was OK. So it looked like in IE6 when we want
to get a field by ID, $() function works on name attribute, not on id

I did a test, and renamed the first password field (id="loginPasswd"):

<input name="loginPasswd" type="password" id="loginPasswd" />

and now after alert($('passwd').inspect()) I got the correct answer.

I think there's something wrong with $() function on IE6...

A workaround for this problem (I wanted to leave the name attributes,
to be the same name) was to add some unique class name to the input
field, and then work on object got not by $('passwd') function but
something like:


What do you think?

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to