Re: name, id, and forms
by Mario Figueiredo <admin(at)marfig.com>
|
| Date: |
Tue, 8 Oct 2002 19:59:52 +0100 |
| To: |
<hwg-techniques(at)hwg.org> |
| In-Reply-To: |
1 |
| |
todo: View
Thread,
Original
|
|
Hello Greg,
I've seen your question before and noticed it got without a reply=
:)
The reason for this is that what you ask is really not easy to=
answer... or
so it seems.
I've read through the XHTML 1.0 and HTML 4.01 specifications and=
what I
came up with was that name attribute rules you talk about ONLY=
apply to the
elements img, form, frame, a, iframe, applet and map.It doesn't=
apply to
the input element.
Read: http://www.w3.org/TR/xhtml1/#h-4.10
This should mean the name attribute can be used on the input=
element.
Consequently on the <input type=3D"checkbox"...>
Best Regards,
Mario Figueiredo
http://www.marfig.com (portuguese speakers)
http://www.marfig.com/en_index.htm (english speakers)
admin(at)marfig.com
On Tue, 08 Oct 2002 12:30:05 -0400, Greg Hart wrote:
>My apology if this actually made it out to the list the first=
time.
>
>I've read repeatedly that in converting from HTML to XHTML, you=
must at
>least replace "name" with "id", or to keep older browsers happy,=
have both
>present. I've also read in a few places that they have to be the=
same
>value. Simple enough, until you get to elements such as=
checkboxes, radio
>buttons, and the like, which before had to share the same "name"=
value.
>
>So my question is, on form items where normally the name would=
have been
>the same to group them, is this an unnecessary thing now, and we=
can name
>them "orderitem1", "orderitem2", etc? And how does the form know=
they are
>grouped, and should show up on the email side together (using=
Matt's
>FormMail.cgi)? One example is where I'd have 20 or more=
checkboxes,
>previously all marked as name=3D"Purchase"...before, I'd see the=
incoming
>order as Purchase: Item1, Item2, Item3, etc. Common sense tells=
me that if
>I lose the name altogether, the script I had been using should=
break. I
>haven't actually tested this theory yet, because the same issue=
is
>breaking
>my JS as well.
>
>Also, what browsers will be a problem and won't see the "id",=
requiring
>the
>"name" be left in to process the form?
>
>Just trying to get a handle on what the best way(s) to work=
forms are in
>XHTML...
>
>-Greg
>
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.