Re: How do you include a <INPUT TYPE="IMAGE"> to work?

kennykb@dssv01.crd.ge.com
Mon, 5 Jun 95 10:40:37 EDT

I'm including the HTML working group in the distribution of this message
because it's starting to appear that an interpretation ruling is needed to
resolve this issue.

There's been a discussion running for a while on whether <INPUT> elements
in HTML forms, notably <INPUT TYPE=IMAGE>, require a NAME attribute.
The DTD says that it is #IMPLIED, but the narrative description
of form submission does not discuss how to form the correct name
for an element in a form data set when no NAME attribute is present in
the corresponding INPUT element.

Carlos Pero posted a message to one of the WWW authoring newsgroups to the
effect that an element like <INPUT TYPE=IMAGE SRC="URI"> without
a NAME submitted a form data set with the co-ordinate pair identified
by the names `x' and `y' with neither field name nor period prepended, and
that the NAME attribute was optional.

Remembering the narrative language of an earlier HTML
specification, I posted that:
|> Yes a name IS required -- it's optional only for TYPE=RESET and
|> TYPE=SUBMIT. The co-ordinates are transmitted as fieldName.x and
|> fieldName.y, and the behavior you describe is an attempt by Mosaic to
|> handle invalid HTML -- other browsers do other things, most of which
|> are unamusing.

Pero replied:
|"an attempt by Mosaic"? Netscape handles it as well. Unless you
|can point me to the URL where this is said to be "official", I'm still
|going to believe that the NAME is an optional tag.

The SGML DTD syntax, of course, doesn't provide any way to make the presence
of any given attribute conditional upon the value of another attribute,
so referring to the DTD is not helpful; since <INPUT TYPE=SUBMIT> and
<INPUT TYPE=RESET> don't require NAMEs, the NAME has to be #IMPLIED
throughout.

An earlier draft of the HTML spec (one that I'm looking at carries the
date of 17 October 1994) states:
[The NAME] attribute is required for most input types and is
normally used to provide a unique identifier for a field, or
for a logically related group of fields.

This language appears to be missing from the current (June 3) draft,
which I find puzzling, given that the DTD still describes NAME as a required
attribute for SELECT and TEXTAREA -- the last tends to indicate an intention
that input elements that submit data must be named.

Was it the intent of the Working Group to require that all form elements
be named? If so, could there be some mention of this in the spec? If
not, could the section on form submission discuss the proper assignment of
implied values for the NAME attribute?

73 de ke9tv/2, Kevin KENNY GE Corporate R&D, Niskayuna, New York, USA