You could use jquery preventDefault method. I have been a lot of information on the Internet. If you want to continue with using a link to the top of the page (which isn't unobtrusive, progressive, or graceful) then you need to call the sub() function explicitly and test its return value before deciding if you should call submit() or not. By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. home > topics > javascript > questions > onsubmit, run a javascript, return true or false Join Bytes to post your question to a community of 471,408 software developers and data experts. js-form-validation.css is the stylesheet containing styles for the form. It prevents the event from propagating the DOM Stops callback execution and returns immediately when called. So onjQueryAPI finds the reason, see the following words, you understand: Forms and their child elements should not use input names or ids that conflict with properties of a form, such assubmit,length, ormethod. - schulwitz (JavaScript, jQuery) I know that the onsubmit event occurs when a form is submitted. <button type="submit" id="submit" onclick="return false;" class="btn btn-primary col-4">Proceed</button> or you can use: Try to change you "button" code like that. Why is SQL Server setup recommending MAXDOP 8 here? Is it possible to get data from HTML forms into android while using webView? onsubmitsubmitJavaScriptreturn false; . sample-registration-form-validation.js is the external JavaScript file which contains the JavaScript ocde used to validate the form. HTML5 video javascript controls restart video, jQuerys jquery-1.10.2.min.map is triggering a 404 (Not Found), is treated as the FunctionBody of a JavaScript function, step 5 of The event handler processing algorithm, it says Process return value as follows. How to add new line breaks in textarea using Javascript ? Developers use the return false in many different cases.For example, By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. What is the meaning of onsubmit="return false"? Step 2. Form OnSubmit to wait jQuery Ajax Return? What is the !! Generally, we are calling a method on the onsubmit event, like