posted 19 years ago
I have a form with two Submit buttons. Is it possible to only have one of the buttons trigger the action="Servlet", while the other does not. What I am trying to do is have only one button submit the form while the rest run methods which change my html/jsp front-end.
I cannot figure out how to keep a button from submitting a form. I only want one of the buttons to submit the form not all of them. If there is a way around this please let me know.
--------------------My code ---------------------------
<form action="Servlet" method="get">
<input type="submit" name="Submit" value="Submit">
<%
if(request.getParameter("Submit") != null){.a dynamic change occurs here..}
%>
<input type="submit" name="Submit2" value="Submit">
</form>