[thelist] Finding all checkboxes or radios w same name, without document.all

Dave Merrill dmerrill at usa.net
Mon Feb 7 21:52:12 CST 2005


Nice resource Christian, didn't know about that (though I did know about
other pages at quirksmode).

So the upshot seems to be that support for getElementsByName is funky in
some respects on most major browsers. But still, it may be ok for typical
use. For instance, if I wanted to get the effective submit value of a set of
radios, then...
  a) They'll all be form objects, which are supported. (The quirksmode pages
says IEwin only sees 'input' objects, but here it also sees selects and
textareas.)
  b) There won't be other objects on the page with IDs that overlap the
names of the form elements I'm using. At least, I can't think of any reason
why there'd need to be.
  c) They'll all be standard html objects, not custom tags like the reported
<ppk>. Again, I can't think of any reason why I'd need custom tags in this
context.

One thing this does tell me is that Safari, which I don't have, has at least
this level of support, at least by v1.2.

Any other ideas on what to do for platforms where it actually fails?

Dave Merrill

> Joe Ngo wrote:
>
> >Use DOM method getElementsByName(). This is a W3C standard and I
> >believe supported by most modern browsers.
> >
> >
> >
> believing is not knowing:
> http://www.quirksmode.org/dom/w3c_core.html




More information about the thelist mailing list