ryanm. Follow edited Mar 5, 2013 at 15:14. benilov. Note this also affects the jQuery .submit() handler (in addition to the .click() method indicated above). ryanm. The keys are strings in the same form as the events argument with space-separated event type names and optional namespaces. This article introduces a practical approach to how to submit a form using the jQuery Ajax POST request. Share. Submit the form data using AJAX. If you are passing a a lot of data (complex object), It might be a good idea to convert your action method to a HttpPost action method and use jQuery post to post data to that. For AJAX, there are many different possibilities, though you probably want to use either the ajax() or post() methods. There are two thing with respect to one operation in the web. What is jQuery. GET has limitation on the query string value. 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. How to duplicate a div using jQuery? 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 || Try this, if enter key was pressed you can capture it like this for example, I developed an answer the other day html button specify selected, see if this helps.. File: firstjquery.html Try this, if enter key was pressed you can capture it like this for example, I developed an answer the other day html button specify selected, see if this helps.. This way, we can reduce the risk of invalid input. Get all of the data from the form using jQuery. For AJAX, there are many different possibilities, though you probably want to use either the ajax() or post() methods. Stack Overflow - Where Developers Learn, Share, & Build Careers Try this, if enter key was pressed you can capture it like this for example, I developed an answer the other day html button specify selected, see if this helps.. jQuery is cross-platform. Stack Overflow - Where Developers Learn, Share, & Build Careers jQuery is a small and lightweight JavaScript library. Let's see a simple jQuery example. jQuery simplifies AJAX call and DOM manipulation. Improve this answer. So, we will create an example to add a user and show in the list. Then I enabled the enter key for certain fields by id. In this code after submit button click we call jquery ajax and we pass url to post type POST/GET You can display the submit form as a separate page inside the iframe, and when it gets submitted the outer/container page will not reload. So any link must be converted to such form submit, so the login data is not lost. jQuery Example. You can find lots of information at jquery.com, including documentation with examples.For submitting a form normally, check out the submit() method to at that site. jQuery means "write less do more". // Don't forget e.preventDefault() if you want to stop normal form .submission }); This is a nitpicky answer, but let me explain why this is a better solution: We're properly handling a form submit rather than a button press. @JacopoStanchi I unfortunately didn't find any. Supports features like auto-close, themes, animations, and more. jQuery is cross-platform. Make sure to add an id of post-form to the form on the index.html file: jQuery is cross-platform. Share. Intended for jQuerys internal use; specific properties may be removed when they are no longer needed internally to improve page startup performance. 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 || Like this: