[thelist] vbscript: form values disappearing when I don't use 'name'
kasimir-k
evolt at kasimir-k.fi
Tue Apr 18 12:45:53 CDT 2006
Canfield, Joel scribeva in 18/04/2006 17:30:
> I'm trying to get away from using both 'name' and 'id' for form fields.
> but without 'name', the field values are blank/missing/something like
> that.
As they should be.
From http://www.w3.org/TR/html401/interact/forms.html#form-controls
"A control's "control name" is given by its name attribute."
So if you want to receive the value of a form field when the form is
submitted, then you must use the 'name' attribute.
One thing worth noting here is that your form elements don't necessarily
have same value for 'id' and 'name' - 'id' must be unique in the
document, whereas multiple form elements may share name.
.k
More information about the thelist
mailing list