W3C home > Mailing lists > Public > www-html@w3.org > March 2003

button element and form interaction

From: Peter Bowen <pzb@datastacks.com>
Date: 01 Mar 2003 22:05:44 -0500
To: www-html@w3.org
Message-Id: <1046574344.3366.107.camel@localhost.localdomain>

I recently attempted to switch my submit buttons from input elements,
with the type attributes set to submit, to button elements.  However I
am a little confused as to the proper behavior of the button element,
both when used singly and when multiple button elements are in a form.

Section 17.5 of the HTML 4.01 Specification (24 December 1999), suggests
that the value attribute of a button element should be sent to the the
server as the value.  Additionally, the spec states "Buttons created
with the BUTTON element function just like buttons created with the
INPUT element...".  I interpreted this to mean that if there are two or
more buttons in a single form element, both of which are of type submit,
only the name and value of the selected button would be sent to the

However, real world experimentation shows that my browsers don't always
follow my understanding of the spec.  Some seem to use my interpretation
of the spec, while others appear to ignore the value attribute of the
button element altogether and submit the character data inside the
element.  Additionally some browsers only appear to submit one button
per form, while others seem to submit the name/value pairs for _all_
buttons on the form.

What is the proper/expected behavior in these cases?

Received on Saturday, 1 March 2003 22:30:36 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:02 UTC