Shane Mingins wrote:
If memory serves me correct .... <BUTTON> was only supported by IE .... has
that changed?

I like the button tag and I was going to use it when I found it because of the control over the button text and values that are submitted. I was testing using Mozilla and it was great. It is probably supported by Opera etc


But testing with IE (version 6 I think) showed it had problems. It is unusable with out resorting to JavaScript to control it's use.

The spec says that the default action for a <button> tag should be 'submit'. IE defaults to 'button' which means it won't submit a form (this means you need to add type="submit" to the tag).

But the problem that made it unusable was that when the form is submitted all button fields are submitted. Also instead of passing the value in the 'value' attribute, it passes the button text.


Try this in your favourite browers:


<html>
<body>
<form action="" method="GET">
<input type="text" name="textfield1"/><br/>
<button name="dispatch" value="first" type="submit"><b>first</b> button</button>
<button name="dispatch" value="second" type="submit"><b>second</b> button</button>
<button name="dispatch" value="third" type="submit"><b>third</b> button</button>
</form>
</body>
</html>


Pressing the first button:

Mozilla result (good):
        button_test.html?textfield1=abc&dispatch=first

IE 6 result (bad):
        
button_test.html?textfield1=abc&dispatch=%3CB%3Efirst%3C%2FB%3E+button&dispatch=%3CB%3Esecond%3C%2FB%3E+button&dispatch=%3CB%3Ethird%3C%2FB%3E+button



Shane


-----Original Message-----
From: Graham Leggett [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 30 September 2003 4:48 a.m.
To: Struts Users Mailing List
Subject: <BUTTON> element

Hi all,

I don't seem to see a corresponding struts html tag to render a "button"
element - is there a reason for this, or am I reading the docs wrong?

Regards,
Graham
--


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Jason Lea


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to