-
-
Save RimonEkjon/884231a4696612f6b0c4 to your computer and use it in GitHub Desktop.
Generic form submission over ajax with jsonp response
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#form').submit(function() { | |
payload = $(this).serialize(); | |
$.ajax({ | |
url: 'http://', | |
type: 'POST', | |
data: payload, | |
dataType: 'jsonp' | |
success: function(data){ | |
// present success message here | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment