Hi there,
You can use java script to do this very easily. Catch iAction in your java
code.
for example:
<html>
<SCRIPT>
function doLDAPGetServerInputPage()
{ document.LDAPServerListForm.iAction.value="GET_SERVER_INPUT_PAGE";
document.LDAPServerListForm.submit();
}
function doLDAPSearch()
{ document.LDAPServerListForm.iAction.value="SEARCH";
document.LDAPServerListForm.submit();
}
</SCRIPT>
.....
....
<FORM NAME=LDAPServerListForm
ACTION=http://gargi.zapnet.de/servlets/AdminServer METHOD=POST >
<INPUT TYPE=HIDDEN NAME=iAction VALUE="SEARCH">
<INPUT TYPE=HIDDEN NAME=iActionObject VALUE="LDAP">
<INPUT TYPE=HIDDEN NAME=iServerId VALUE="">
<INPUT TYPE="button" NAME="but1" VALUE="but1"
onClick="doLDAPGetServerInputPage()">
<INPUT TYPE="button" NAME="but2" VALUE="but2" onClick="doLDAPSearch()">
</FORM>
.....
....
</html>
Oksana Kochubey wrote:
> Hi everyone,
>
> I have a question. I have two submit buttons on my HTML form which need to
> envoke two different servlets. How can I write two <form action .. >
> statements in my HTML to differentiate between two actions?
>
> <form action="/servlet/ServletName" method="post"> // ????
>
> <td WIDTH=10% align=right><input type="submit" taborder="24" tabindex="24"
> title="CONTINUE" name="CONTINUE" value="CONTINUE"></td>
>
> <td WIDTH=10% align=left><input type="submit" taborder="24" tabindex="24"
> title="FINISH" name="FINISH" value="FINISH"></td>
>
> Thanks,
>
> Oksana
>
> ___________________________________________________________________________
> 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