You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Norris Shelton <no...@yahoo.com> on 2005/02/02 19:37:29 UTC
Re: question about form buttons
I eventually struggled through this. Here is what I ended up
with:
<c:url var="editImage" value='/images/buttonEdit.jpg'/>
<html:image src="${editImage}" alt="Edit" value="edit"/>
<c:url var="resetImage" value='/images/buttonReset.jpg'/>
<html:image src="${resetImage}"
onclick="javascript:reset();return false;" alt="Reset"
value="reset"/>
<c:url var="clearImage" value='/images/buttonClear.jpg'/>
<html:image src="${clearImage}"
onclick="javascript:clearFields();return false;" alt="Clear"
value="clear" />
clearFields is a js method that knows the default values for a
blank form.
--- Norris Shelton <no...@yahoo.com> wrote:
> I need 3 buttons
> 1) normal submit button - works correctly - yeah
> <c:url var="addImage" value='/images/buttonAdd.jpg'/>
> <html:image src="${addImage}" alt="Add" value="add"/>
>
> 2) reset button - press this and any changes since the last
> form
> submit are removed
> Tried (displayed image, but submitted:
> <html:image src="${resetImage}" alt="Reset" value="reset"/>
> used (resets correctly, but no image:
> <html:reset alt="Reset" value="reset"/>
>
> 3) clear button - runs some javascript to blank all of the
> fields.
> Displays image correctly, clears form, but submits.
> <html:image src="${clearImage}" alt="Clear" value="clear"
> onclick="clearFields();return false;"/>
> A complicating factor is that all of these need to be images.
>
> =====
>
> Norris Shelton
> Software Engineer
> Sun Certified Java 1.1 Programmer
> Appriss, Inc.
> ICQ# 26487421
> AIM NorrisEShelton
> YIM norrisshelton
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - now with 250MB free storage. Learn more.
> http://info.mail.yahoo.com/mail_250
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
=====
Norris Shelton
Software Engineer
Sun Certified Java 1.1 Programmer
Appriss, Inc.
ICQ# 26487421
AIM NorrisEShelton
YIM norrisshelton
__________________________________
Do you Yahoo!?
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org