[Pdx-pm] CGI.pm -- names verses ids
randall at sonofhans.net
Tue May 3 17:09:14 PDT 2005
On May 3, 2005, at 4:39 PM, Roderick A. Anderson wrote:
> Not to mention it is getting rather tedious typing both a name and id
> attribute for almost every form element.
it is a little tedious; hard to avoid, though. "id" is a unique
identifier for the element in the document (in short, a DOM id). even
if you don't use any style sheets or active scripting, "id" is useful
for labels. "name" is the control name for the associated control
(e.g. an input box); it does not need to be unique.
> So what is suppose to happen when I click [Submit] on my form and I
> only have an id attribute for an element?
according to the spec, nothing. for a control to be "successful" (a
term of art, in this case) a name is required.
More information about the Pdx-pm-list