[thelist] Radio Button Value Property Does Not Exist in Netscape 6.1?

MRC Webmaster webmaster at equilon-mrc.com
Mon Oct 29 15:12:21 CST 2001


Gregory,

> "change id="txtStep1" to id="txtStep1[]" and it works in NS4,6,IE5 ...

    Hmm. That doesn't seem right to me. Instead, I would say that your
problem is in the duplication of the id for both radio inputs. In IE, by
using an id for more than one element, you implicitly create an array of
elements for that id. However, the HTML 4.01 recommendation declares that an
id "must be unique in a document." [1] (Oh, and the braces are not legal
characters for an id value [2].) The workaround that you've been given would
seem to suggest that Netscape 6 does something similar to IE by creating an
array, but it could also be considered buggy behavior that may well be
altered in a future Mozilla release. I would not rely on it.
    Remember: you can (in fact, for a radio element, must) duplicate the
value of the name attribute within a form; but you should *not* duplicate
the id value.

James Aylard

1. http://www.w3.org/TR/html401/struct/global.html#adef-id
2. http://www.w3.org/TR/html401/types.html#type-id





More information about the thelist mailing list