One way to stop form submission is to return false from your JavaScript function.
When the submit button is clicked, a validation function is called. I have a case i
You can use the return value of the function to prevent the form submission
and function like
In case of Chrome 27.0.1453.116 m if above code does not work, please set the event handler's parameter's returnValue field to false to get it to work.
Thanks Sam for sharing information.
EDIT :
Thanks to Vikram for his workaround for if validateMyForm() returns false:
where validateMyForm() is a function that returns false if validation fails. The key point is to use the name event. We cannot use for e.g. e.preventDefault()