At first glance, the <BUTTON> tag seems pretty darn useful as a way to do something different from the plain old boring buttons you get with <INPUT type=submit ...>. All you have to do is insert something like the following into your HTML:
<BUTTON type=submit name=foo value=bar> ... wicked cool HTML ... </BUTTON>
This is supposed to result in a submit button for your form that looks like whatever "wicked cool HTML" tags you choose to put inside the <BUTTON ...></BUTTON> container. When clicked, the button returns the value "bar" in the parameter "foo".
However, it's been well documented that Microsoft Internet Explorer (MSIE) utterly fails to implement the <BUTTON> tag properly:
Frankly, it's hard to imagine how the MSIE developers could have gotten this more wrong. If they at least only returned the INNERTEXT value of the button that was clicked, you could come up with a hack to infer the correct value by scanning the INNERTEXT. But since there's no way to know which button actually submitted the form, you're pretty much screwed.
So now you can use the combination of the "foo" and "buttonPressed" variables to figure out what the user wants:
Hey, it's far from perfect, but it's better than nothing.
Hal Pomeranz, 7/14/2007
Return to: Deer Run Home > Hal's Homepage >