I am trying to handle multiple submit buttons in spring mvc in java. 1st Submit buttons is for Server side call and 2nd Submit button is only for Client Side call.
But here the problem here I am facing is, for both submit button, control is going to Server side . I am Using plane jsp with spring tag. Here my requirement is one submit button should work for server side & another submit button only works for client side.
CODE Snippet:
<body>
<div>
<form:form commandName="route" method="post" action="routeSave" id="route">
<div class="center">
Start:<form:input path="start" id="start" maxlength="50"/>
End:<form:input path="end" id="end" maxlength="50"/>
City:<form:input path="city" id="city" maxlength="50" onchange="mapcenter()"/>
RouteName:<form:input path="routeName" id="routeName" maxlength="50"/>
StartTime:<form:input path="startTime" id="startTime" maxlength="50"/>
<form:button value="SaveMap">Save Button</form:button>
<form:button value="SaveMap" onclick="save_map()">Save Map</form:button>