Created
June 28, 2012 12:31
-
-
Save asfaltboy/3011087 to your computer and use it in GitHub Desktop.
generic form submission over ajax with jsonp response
This file contains 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