W3C home > Mailing lists > Public > public-html@w3.org > December 2008

Re: Button Element in IE8

From: Thomas Broyer <t.broyer@ltgt.net>
Date: Wed, 17 Dec 2008 01:30:32 +0100
Message-ID: <a9699fd20812161630q439030fdm7c57be7665a2c0b8@mail.gmail.com>
To: public-html <public-html@w3.org>

On Wed, Dec 17, 2008 at 1:13 AM, Travis Leithead wrote:
>
> I've got a customer pointing me to http://www.kloots.net/ie8/bug-01.php,
> which demos a supposed IE8 bug. However, I've searched HTML4 and HTML5 and
> can't find any normative text that backs up the author's claim that it's
> wrong to submit the BUTTON's value if the button is not of type=submit.
>
> Is this really a bug?>

Yes.
http://www.w3.org/TR/html4/interact/forms.html#adef-type-BUTTON
"""This attribute declares the type of the button. Possible values:
 * submit: Creates a submit button. This is the default value.
 * reset: Creates a reset button.
 * button: Creates a push button."""
Where "push button" links to:
http://www.w3.org/TR/html4/interact/forms.html#push-button
""Authors may create three types of buttons:
 * submit buttons: When activated, a submit button submits a form. A
form may contain more than one submit button.
 * reset buttons: When activated, a reset button resets all controls
to their initial values.
 * push buttons: Push buttons have no default behavior. Each push
button may have client-side scripts associated with the element's
event attributes. When an event occurs (e.g., the user presses the
button, releases it, etc.), the associated script is triggered."""

Isn't it clear that <button type=button> does *not* trigger a form
submit? (except if a script handle the "click" event with
form.submit())

> If so, can you conjure up some clarifying text in
> section 4.10.5?

How isn't HTML5 even clearer already?
"""Submit Button
   If the element has a form owner, the element must submit the form
owner from the button element.

Reset Button
   If the element has a form owner, the element must reset the form owner.

Button
   Do nothing."""
http://dev.w3.org/html5/spec/Overview.html#attr-button-type-button-state

-- 
Thomas Broyer
Received on Wednesday, 17 December 2008 00:31:20 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:00 UTC