The HTML/4.01 spec does have something that addresses this, the <button> tag. The problem is browser support.

You can supply the 'type' (eg submit, reset, button), a 'value' that is returned as the name/value pair, and the button label is the body of the tag (meaning you can mix images, text, and other formatting tags into the label). You can use it like this:

  <button name="dispatch" value="delete" type="submit">
    <IMG src="/icons/del.gif" alt="delete"> <b>delete</b> item
  </button>

Which is great, but as IE doesn't support it correctly it becomes useless. Other browsers do support it, Mozilla for example.

IE's problems include defaulting all <button> tag 'types' to 'button' instead of 'submit', returning the label in the name/value pair and putting all button fields into the request instead of the submit button being activated.

So we are stuck with using <input> buttons and LookupDispatchAction.


Craig R. McClanahan wrote:
Adam Hardy wrote:

I thought I might just raise this here because I see struts has obviously no qualms about submit button functionality, but it bugs me.

I'm not using LookupDispatchAction, but I would like to if it wasn't for the annoying browser behaviour on submit of the HTML-input submit button values.

LookupDispatchAction is great for sorting out the appropriate action according to which submit button was clicked, even if those submit buttons have got localized text. But surely it's just pandering to the poor design of HTML?


Yep.



Surely W3C is going to have to change that browser behaviour recommendation,


Whether they should or not isn't really the issue ... it's whether they will. I'm betting that:

* They won't (especially not as an HTML/4.01 successor, since the focus there
is on XHTML and modularization and such, not HTML.


* They won't (just for this issue) because it's not important enough by itself, and
creating new standards is *expensive*.


* They won't (because existing workarounds are available -- it's not a dealbreaker bug

* Even if they did, it wouldn't matter to Struts ... we'd have to support the current
mechanism anyway because 100% of the worlds browsers today don't support the
new mechanism.



because submitting the button name-value pair as "submit/labeltext" is indisputably linking function and content, which these days should be frowned upon.

Shouldn't it?

I mean, it could use body text for the label, and submit its value, or it could have a caption attribute or similar.


Adam




Craig



---------------------------------------------------------------------
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