Skip to content

Instantly share code, notes, and snippets.

@calvinchoy
Last active April 4, 2020 09:00
Show Gist options
  • Save calvinchoy/5299249 to your computer and use it in GitHub Desktop.
Save calvinchoy/5299249 to your computer and use it in GitHub Desktop.
JS - simple ajax call #jquery
$.ajax({
type: "POST",
url: "url to the server processing code",
dataType: "json",
contentType: "application/json",
data: JSON.stringify({}),
success: function(response) {
//response is json data returned from server side url
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment