> Not sure why you think we can ignore the scenario where the case of
> the ID is different

You're absolutely right, we can't.  I don't know why I thought that,
either. :-)


> Does this also happen with a valid doctype?

Gah!  Good catch, kangax.  No, it doesn't!  All of the browsers work
with the mixed case with a proper doctype, and FF, Safari, and Opera
correctly return empty lists with we give the wrong case in our

IE6 still incorrectly finds the elements with the ID selector (though
not with class selectors) when we give the wrong case.  So there's an
issue on IE, these two selectors work find element 'aBc1' when they


...although these don't find the td.De class things when then

$$('#abc1 td.de')

Jay, could you open a ticket on lighthouse for that?[1]  I don't know
that it'll get any kind of priority given how bad IE is about IDs in
general (its document.getElementById also ignores case, and for that
matter will happily return an element with the given value as a name
rather than as an ID).  But since Prototype does try to smooth out
browser diffs.  $('abc1'), since it uses the underlying
document.getElementById, also has this case-insensitivity issue on IE.

[1] http://prototypejs.org/contribute

Thanks again for raising this, Jay.
T.J. Crowder
tj / crowder software / com

On Nov 20, 4:11 am, kangax <[EMAIL PROTECTED]> wrote:
> On Nov 19, 5:46 pm, Jay <[EMAIL PROTECTED]> wrote:
> > I was trying to scale down the example to the essence of the issue. Of
> > course, $('Contents') should be interchangeable with $$('#Contents'),
> > except that is the bug - it doesn't work on Safari or IE. In the real
> > world, I might want the selector to be more like $$('table#tblTMRoster
> > tbody tr td.countChecked'+i) - while there may be many tables with
> > such cells, I only want one table's worth. Another bug for another day
> > is this: even if there is only one table in the page, $$('tbody tr
> > td.countChecked'+i) returns not only the td's in the tbody, but also
> > the ones in the tfoot, and the only workaround I could come up with
> > was to prepend the table id on the selector to make it work.
> > Finally, while one assumes id's ought to be unique, $$('#contents')
> > returns an array of all elements with any case-variations like
> > contents, Contents, conTents, whatever. At least that bug is on
> > Safari, however not in Firefox nor IE. So again, if there is any way
> > to make Prototype.js wrap up these browser inconsistencies, it would
> > be a boon for the programmer.
> Does this also happen with a valid doctype?
> > Cheers,
> > --Jay
> [...]
> --
> kangax
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 [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to