Specifically if someone is facing problem in Chrome:. To submit an HTML form using JavaScript, we are calling validate() to validate data when the onsubmit event is occurring. jQuery /; jQuery ; jQuery ; jQuery ; jQuery stop() jQuery Callback; jQuery Chaining; jQuery HTML. This way, we can reduce the risk of invalid input. 55 Note this also affects the jQuery .submit() handler (in addition to the .click() method indicated above). Specify the forms name as for example yourFormName then you should be able to submit the form without having focus on the form.. document.onkeypress = keyPress; function keyPress(e){ var x = e || So any link must be converted to such form submit, so the login data is not lost. Use class selector instead, or try this: $('form').each(function(){ $(this).submit(function(e){ e.preventDefault(); alert('it is working! A multipurpose alert & confirm plugin, alternative to the native alert() and confirm() functions. How to validate a string for a numeric representation using TryParse in C# So any link must be converted to such form submit, so the login data is not lost. As of jQuery 1.7, the .on() function submitFormFunction(event) { event.preventDefault(); $("form#form1").submit(); } Note I'm binding to the form submit event rather than a button click event. I had this and it turned out there was an onclick added to the remote form submit button, which removed the form's containing element. The append() method of the FormData interface appends a new value onto an existing key inside a FormData object, or adds the key if it does not already exist. Follow answered May 31, 2009 at 19:39. Follow answered Mar 15 at 12:13. myleftshoe myleftshoe. ryanm. Submit the form data using AJAX. Improve this answer. Stack Overflow - Where Developers Learn, Share, & Build Careers In the second form of .on(), the events argument is a plain object. Submit the form data using AJAX. Step 3 Handling Form Submit Logic in JavaScript and jQuery. Follow edited Mar 5, 2013 at 15:14. benilov. Looks like your IndexPartial action method has an argument which is a complex object. This solution disabled the enter key and fixed the problem though, thanks @Dave! @JacopoStanchi I unfortunately didn't find any. jQuery means "write less do more". The value for each key is a function (or false value) that is used as the handler instead of the final argument to the method. Like this: