JavaScript code to stop form submission
You can use the return value of the function to prevent the form submission <form name=”myForm” onsubmit=”return validateMyForm();”> and function like <script type=”text/javascript”> function validateMyForm() { if(check if your conditions are not satisfying) { alert(“validation failed false”); returnToPreviousPage(); return false; } alert(“validations passed”); return true; } </script> In case of Chrome 27.0.1453.116 m if above … Read more