----- Original Message -----
From: Eike Hirsch <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 08, 2000 11:57 AM
Subject: Re: How to know which form button was pressed?


>
> > Hello all,
> >
> > I'm developing a mini applications server for internal purposes, and now
I'm
> > facing with a problem: suppose I have the following html code:
> >
> > <form action=/servlet/.....>
> > <input type="SUBMIT" NAME="btn_1" VALUE="First button">
> > <input type="SUBMIT" NAME="btn_2" VALUE="Second button">
> > </form>
> >
> > How do I know when user press the 1st or the 2nd button?
> >
> > Thanks in advanced
> >
Hi,

point your form at a suitable SnoopServlet to see what you are sent,
you should find that the form element name that caused the submit should
be sent in the request header. In the case of an image button being used
<input type="image"....> you will even get the x and y coordinates
relative to the top left of the image where the mouse pointer was when
it was clicked on.

Andy Bailey

___________________________________________________________________________
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