You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Cohan, Sean" <SC...@goSPS.com> on 2002/09/05 23:51:05 UTC

Newbie on image

This must be a no-brainer, but I'm not real familiar with where to look for
things yet.  

I'd like to use a gif for a submit pushbutton.  I think I use the
<html:image> tag and specify the gif with the src property.  Correct?  How
do I specify what the action should be when clicked - I want it to perform
the submit action of the <html:form>?  Thanks.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Newbie on image

Posted by Max Cooper <ma...@maxcooper.com>.
Yes, <html:image> is just what you are looking for. You often want to use
page= instead of src= so the tag will add your contextPath to the beginning.

The action is specified in the form. Something like this will submit to
booya.do:

<html:form action="/booya.do">
  <html:image page="/images/booya.jpg" />
</html:form>

Remember that it all turns into plain old HTML before it reaches the
browser, so it won't do anything magic. It just becomes an <input
type="image"> tag in the <form>.

-Max

----- Original Message -----
From: "Cohan, Sean" <SC...@goSPS.com>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Thursday, September 05, 2002 2:51 PM
Subject: Newbie on image


> This must be a no-brainer, but I'm not real familiar with where to look
for
> things yet.
>
> I'd like to use a gif for a submit pushbutton.  I think I use the
> <html:image> tag and specify the gif with the src property.  Correct?  How
> do I specify what the action should be when clicked - I want it to perform
> the submit action of the <html:form>?  Thanks.
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>