You will have to give them different NAMES, say
<input type="image" name="action1" ...
<input type="image" name="action2" ...

and then look for

if(request.getParameter("action1.x") !=null)
{
...
}
else if(request.getParameter("action2.x") !=null)
{
...
}

etc

"Vinay K.V. Menon" wrote:
>
> Hi!
>         But then if we have 2 IMAGE inputs in a form how will one distinguish
> between which of the images was clicked?
>
> Thanks!
> Vinay
>
> > -----Original Message-----
> > From: A mailing list for discussion about Sun Microsystem's Java Servlet
> > API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Steve
> > Bradshaw
> > Sent: Tuesday, June 06, 2000 7:09 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: HELP ---- INPUT TYPE=image
> >
> >
> > <Input type=image...> passes two parameters - action.x=<Distance of
> > mouse cursor from left of image when user clicked it> and
> > action.y=<Distance of mouse cursor from top of image when user clicked
> > it>.  Strange idea I think.
> >
> > Maybe use <FORM METHOD=get > to familiarise your self with it if your
> > still having problems - or check a HTML ref.
> >
> >
> > "Vinay K.V. Menon" wrote:
> > >
> > > Hi!
> > >         I am using an image input type to post form data from
> > one servlet to
> > > another.
> > >         This is the snippet that produces the
> > >
> > >         <INPUT TYPE="image src="but_save_big.gif" WIDTH=56
> > HEIGHT=22 BORDER=0
> > > value=save NAME=action ALT=Save>");
> > >
> > >         But when I do,
> > >
> > >         request.getParameter("action")
> > >
> > >         in the servlet to which the form is posted, I get a null!
> > >
> > >         Any clues?
> > >
> > > Vinay
> > >
> > >
> > __________________________________________________________________
> > _________
> > > To unsubscribe, send email to [EMAIL PROTECTED] and include
> > in the body
> > > of the message "signoff SERVLET-INTEREST".
> > >
> > > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > > Resources: http://java.sun.com/products/servlet/external-resources.html
> > > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
> > --
> > Regards
> >
> > Steve Bradshaw
> >
> > Software Developer, Autonomy Systems Ltd.
> > St. John's Innovation Centre - Cowley Road - Cambridge - CB4 0WS -
> > UK
> > Web: http://www.autonomy.com/
> > Tel: +44 1223 422460
> > Fax: +44 1223 421583
> >
> > The information contained in this message is for the intended addressee
> > only and may contain confidential and/or privileged information.  If you
> > are not the intended addressee, please delete this message and notify
> > the sender; do not copy or distribute this message or disclose its
> > contents to anyone.  Any views or opinions expressed in this message are
> > those of the author and do not necessarily represent those of Autonomy
> > Systems Limited or of any of its associated companies.  No reliance may
> > be placed on this message without written confirmation from an
> > authorised representative of the company
> >
> > *** Have a taste of Autonomy's technology for free.
> > Download Kenjin at www.kenjin.com ***
> >
> > __________________________________________________________________
> > _________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include
> > in the body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> >
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

--
Regards

Steve Bradshaw

Software Developer, Autonomy Systems Ltd.
St. John's Innovation Centre - Cowley Road - Cambridge - CB4 0WS -
UK
Web: http://www.autonomy.com/
Tel: +44 1223 422460
Fax: +44 1223 421583

The information contained in this message is for the intended addressee
only and may contain confidential and/or privileged information.  If you
are not the intended addressee, please delete this message and notify
the sender; do not copy or distribute this message or disclose its
contents to anyone.  Any views or opinions expressed in this message are
those of the author and do not necessarily represent those of Autonomy
Systems Limited or of any of its associated companies.  No reliance may
be placed on this message without written confirmation from an
authorised representative of the company

*** Have a taste of Autonomy's technology for free.
Download Kenjin at www.kenjin.com ***

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to