Wayne wrote:
> Within the body of a standard HTML <button> tag, I can place HTML, 
> such as the <img> tag and this will get rendered
> as the button image.  With struts <html:button> tag, this doesn't work 
> and I get the raw text rendered as the button text.
> Is there a way around this other than going to image maps which don't
>  work the same way as buttons do?

Not sure if <html:button> works the same as <html:submit> but I have the
same problem with submit buttons.  My workaround involves JavaScript:

<script>
function setUserAction(target) {document.forms[0].userAction.value=target;}
</script>

<html-el:hidden property="userAction" value="error"/>

<html-el:submit property="submit"  onclick="setUserAction('Add Prospect');"
styleClass="addButton" titleKey="button.add.prospect" value="     "/>

Setting the 'value' to several spaces (otherwise Netscape buttons are
squished) means you can't tell which button was clicked, so the javascript
sets that userAction property, and that's the one that the
LookupDispatchAction uses to decide what to do next.

-- 
Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management

Reply via email to