a fine way I use is to write the desired url as the action-url using javascript

 <form action=/servlets/Servlet7 name="Form3" method=POST>
    <input type=button value="MyButton1" 
onClick="Form3.action='/servlets/firstOne';submit()">
    <input type=button value="MyButton2" 
onClick="Form3.action='/servlets/secondOne';submit()">
    <input type=submit value="Und ab damit">
 </form>

by clicking on MyButton1 or Mybutton2 the browser changes the action-url of the form. 
By calling submit() next the form will be posted

Thomas Czichon

>Hi All,
>
>I'm facing a problem in calling diferent servlets from a single HTML. As you know we 
>specify the servlet's address and name in action parameter of form tag. But what do I 
>do if I want to call >different servlets depending on what button is pressed. Does 
>anybody knows some thing about it.
>Please respond urgently.
>
>Thanx in advance,
>
>Nitin

>IMRglobal Ltd.
>Plot # 22, SEEPZ,
>Andheri (E), Mumbai-400096
>Phone  : 8291421 Ext. 151
>Mail To : [EMAIL PROTECTED]
>
>___________________________________________________________________________
>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

Reply via email to