W3C home > Mailing lists > Public > www-html@w3.org > April 2004

Re: <button> element

From: Christian Ottosson <christian@ottosson.name>
Date: Wed, 21 Apr 2004 12:11:05 +0200
Message-ID: <408648B9.3020404@ottosson.name>
To: www-html@w3.org

Richard Lewis wrote:

> <form method="post" ...>
> 	<!-- content -->
> 	<button type="submit" name="submit" value="edit">Edit Item</button>
> 	<button type="submit" name="submit" value="del">Delete Item</button>
> </form>
> This works fine in the case of such browsers as 
> Konqueror, Mozilla and Lynx. However, MSIE only returns the *content* of one 
> of the <button> elements (and always the same one, no matter which was used 
> to submit the form), not the 'value'.
> Which browser is exhibiting the correct behaviour?

Due to the specs the value, not the content, is the "inital value" and 
only the activated (pressed) should be "successfull" and submitted. So 
MSIE is wrong, the others right.

I have hade the same problem and if I remember correctly the name and 
content pairs of all buttons where submitted by MSIE (not only the one 
activated). I had to use <input type="submit"/> instead.

Christian Ottosson
()  ASCII Ribbon Campaign -- against HTML mail & vCards
/\                  http://arc.pasp.de/
Received on Wednesday, 21 April 2004 06:11:45 UTC

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