This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 12407 - input type="image" and "name" attribute
Summary: input type="image" and "name" attribute
Status: RESOLVED INVALID
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-31 21:34 UTC by Luca Tomat
Modified: 2011-08-04 05:01 UTC (History)
4 users (show)

See Also:


Attachments

Description Luca Tomat 2011-03-31 21:34:40 UTC
Hello,
in the HTML standard (the one web-developers read) http://www.w3.org/TR/html401/interact/forms.html#h-17.4 you state that the input element has a "name" attribute and since the type="image" is a subclass it is reasonable to expect it present there too.

But in the implementation standard (the one web-browser-developers read) http://www.whatwg.org/specs/web-apps/current-work/multipage/association-of-controls-and-forms.html#constructing-the-form-data-set (point 3.3) the "name" attribute is excluded.

Here we have two standard documents in contraddiction with each other.

Which one is right?

Please see this bug report too:
https://bugzilla.mozilla.org/show_bug.cgi?id=583211
Comment 1 Tab Atkins Jr. 2011-03-31 21:44:28 UTC
HTML4 is an obsolete standard.  Don't read it anymore - use the HTML5 standard, or the developers view of it <http://developers.whatwg.org/>.

In any case, I have no idea what you're talking about re: <input type=image> and @name.  Point 3.3 in the algorithm you link to explains precisely how to deal with the 'name' attribute on <input type=image> when constructing the form data to be submitted.

If there is a problem that I'm somehow missing, can you elaborate?
Comment 2 Luca Tomat 2011-03-31 22:03:21 UTC
Point 3.3 says that the name attribute should be converted in name_x and name_y but it also says to "Skip the remaining substeps for this element" and this means, as i understand it, not to elaborate point 4 which is the point that states the "name" attribute should be sent too.

From a server side, when i have a regular "input" tag, i'll receive the "name" field too, but when i have a "input type=image" tag i'll receive only "name_x" and "name_y" but not "name".

In the HTML 4.01 standard i linked it doesn't say in any place that when the input type is "image" the "name" attribute should not be sent (together with name_x and name_y). Did this change in HTML5?
Comment 3 Tab Atkins Jr. 2011-03-31 22:17:41 UTC
It didn't change; HTML4 was just insufficiently precise.  (That's par for the course in HTML4 - *many* things are insufficiently defined.)

HTML5 just defines the actual behavior more precisely than HTML4 did.
Comment 4 Michael[tm] Smith 2011-08-04 05:01:52 UTC
mass-moved component to LC1