Posted By

catswhocode on 08/19/17


form ajax

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Get all values from form and send it to a page via Ajax

 / Published in: jQuery


Here’s a super handy snippet that I use very often. It works very simply: once the user clicks on #submit, the data from #form is serialized and sent to a remote page using the POST method.

  1. jQuery( document ).ready(function() {
  2. jQuery( "#submit" ).click(function() {
  3. "", jQuery('#form').serialize())
  4. .done(function( data ) {
  5. alert(data);
  6. });
  7. return false;
  8. });
  9. });

Report this snippet  

You need to login to post a comment.