Created
January 11, 2014 12:07
-
-
Save jsven69gist/8370166 to your computer and use it in GitHub Desktop.
jQuery: Ajax request
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 data | |
var data = new Object(); | |
data.property1 = 'Prop1'; | |
data.property2 = 'Prop2'; | |
// Ajax options | |
var options = new Object(); | |
options.data = data; | |
options.dataType = 'text'; | |
options.type = 'post'; | |
options.url = 'file_ajax.php'; | |
options.success = function(response) { | |
if (response == 'whatever') { | |
} else { | |
} | |
} | |
// Ajax request | |
$.ajax(options); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment