This is sometimes a result of JS libraries or custom code that conflicts with the behavior of the submit handler, (for example having another submit handler that submits explicitly the form).
The ideal solution would be to debug and find the conflicting code and solve it.
But as a workaround one can change to use instead a click handler on the submit button, instead of a submit handler on the form.
One can do something like this:
<input type="submit" id="btnSubmit">
Then in code you can do
$('#btnSubmit').click(function(){ //Actually we can do 'input[type="submit"]'
return false;
})
However one has to be careful if the form allows to be submitted by hitting "enter", as in this case the calling of the click handler might be browser dependent and/or based on the libraries in use, see the comments in onsubmit="return false" has no effect on Internet Explorer 7/8 (form is still submitted) on Dirk Paessler's answer for more info.
But in order to be browser independent one might catch the "enter" key press button as well, as in the following code:
document.onkeypress = function(evt) {
var evt = (evt) ? evt : ((event) ? event : null);
var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null);
if ((evt.keyCode == 13) && (node.type == "text")) {
/*return true or false here based on your logic*/;
}
}
However one might also try the other suggestions in this thread such as calling e.preventDefault() directly, although this is what Jquery actually does behind the scenes, still it might be that your conflicting code is fine with it