[thelist] Getting <button> to send value

Craig cd-ml at aardvark.net.au
Fri Sep 27 08:50:09 CDT 2002


Thanks James, I thought there was something wrong :)

----- Original Message -----
From: "James Aylard" <evolt at pixelwright.com>
To: <thelist at lists.evolt.org>
Sent: Friday, September 27, 2002 3:19 AM
Subject: Re: [thelist] Getting <button> to send value


> Craig,
>
> > Why does <button> send the value as what's between the tag rather than
> sending
> > what's specified in value="" ?
>
>     Because, unfortunately, IE's implementation of the button element is
> broken. Technically, the HTML 4.x recommendation [1] doesn't specify that
> the button element cannot submit its innerText value as the value of the
> control, but this seems counterintuitive and, well, silly. I experimented
> with workarounds, but found none that were satisfactory for my particular
> situation [2].
>     Ironically, Microsoft's MSDN documentation for the button element used
> to state that the form would submit the value of the button to the server
> unless it had no value, in which case it would submit the element's
> innerText. However, the button element never worked that way in IE, and
> instead of fixing the behavior Microsoft merely changed the wording of its
> documentation [3]. Very disappointing, IMO.
>
> 1. http://www.w3.org/TR/html4/interact/forms.html#edef-BUTTON
> 2. http://lists.evolt.org/archive/Week-of-Mon-20001002/017911.html,
>    http://lists.evolt.org/archive/Week-of-Mon-20001002/017917.html
> 3.
> http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/button.asp
>
> James Aylard
>
> --
> For unsubscribe and other options, including
> the Tip Harvester and archive of thelist go to:
> http://lists.evolt.org Workers of the Web, evolt !
>





More information about the thelist mailing list