- From: Peter Bowen <pzb@datastacks.com>
- Date: 01 Mar 2003 22:05:44 -0500
- To: www-html@w3.org
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 server. 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? Thanks. Peter
Received on Saturday, 1 March 2003 22:30:36 UTC