[html5] button element value on submission

Brian Tremblay webmaster at tsmchughs.com
Fri Jun 24 15:16:43 PDT 2011

On 6/24/11 11:03 AM, Brian Tremblay wrote:
> Given a form with 2 submit buttons, each with its own value, what
> happens onsubmit? The spec says that only the value of the button used
> to submit the form is to be submitted. What is actual client behavior?
> Details: I have pages with 2 forms to allow visitors to purchase a photo
> via PayPal. The forms are identical, each with a single select element
> and several hidden inputs, except for one hidden input's value; one is a
> "buy now" form, the other an "add to card" form.
> I was thinking of moving the value of the hidden inputs to buttons, then
> putting both buttons in the same form.
> After reading
> http://www.alanflavell.org.uk//www/trysub.html
> it appears that the submit element is out, thanks to a borked
> implementation in MSIE (as late as v.6!).

I've since read MSIE's documentation on their implementation of <button>.
Quite depressing how badly they screwed the pooch. !@#!@# Microsoft.

I can't see how I can use just one form with two submit buttons, since 
the value of <input type=submit> is the text of the created button, but 
the value I need to pass is a random string identifier generated by 
PayPal. If I'm wrong, please do correct me.

Brian Tremblay

More information about the Help mailing list