Skip to content

Instantly share code, notes, and snippets.

@asfaltboy
Created June 28, 2012 12:31
Show Gist options
  • Save asfaltboy/3011087 to your computer and use it in GitHub Desktop.
Save asfaltboy/3011087 to your computer and use it in GitHub Desktop.
generic form submission over ajax with jsonp response
$('#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