Created
November 24, 2016 01:14
-
-
Save DawTaylor/14e2160fbb27b27ca4bc4ed9d62e77aa to your computer and use it in GitHub Desktop.
Simple Ajax Post Data
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
$.ajax({ | |
url : 'handlerURL', | |
type : 'POST', //Cloud be GET/PUT/DELETE/PATCH | |
data : $(form).serialize(), // could be { foo : 'bar', bar : 'foo' } | |
success : function(data){ | |
//Do something with success data | |
}, | |
error : function(error){ | |
//Do something with error data | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment