I am using Struts2 framework in my application, I have one button on my JSP page. That is
Have you tried preventDefault()
?
$("btnSave").click(function(e){
e.preventDefault();
//..rest of the code
});
If you are using s:submit
tag the rendered HTML
output is either input
or button
tag but the type is submit
except for the image
type. You can use the code to execute javascript onclick event that doesn't submit the form.
<s:submit type="button" onclick="return false;"/>