When a User Submits the form i want to stop the default behavior of the form. ie it should not reload. so that i can perform the AJAX request.
here is the code i use
Using jQuery:
$('form').on('submit', function() { // call functions to handle form return false; });
Basically the same as the above solutions, but I prefer to keep my JS out of my HTML, even the "onsubmit" attribute.
"onsubmit"