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
http://christian.ottosson.name/
()  ASCII Ribbon Campaign -- against HTML mail & vCards
/\                  http://arc.pasp.de/
Received on Wednesday, 21 April 2004 06:11:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:00 GMT