[thelist] form id instead of name?

James Aylard webmaster at equilon-mrc.com
Wed Sep 5 10:01:35 CDT 2001


> validating a page with a form on it today, i was reminded that the NAME
> attribute is no longer valid in xhtml strict...

    You can address your form elements through javascript, as others have
indicated. But keep in mind the biggest drawback to dropping the name
attribute in favor of the id attribute: When you submit the form, form
fields without a name attribute are *not* submitted. This is true of Mozilla
0.9.3 and of IE 6, as well as older browsers.
    So dropping the name attribute in forms is only an option for
client-side form-field handling. If you want to submit your form data to the
server, ids alone are not an option.

James Aylard

More information about the thelist mailing list