Skip to content

Instantly share code, notes, and snippets.

@ahmu83
Last active December 20, 2020 01:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmu83/8a069045e0f487c2a0fe to your computer and use it in GitHub Desktop.
Save ahmu83/8a069045e0f487c2a0fe to your computer and use it in GitHub Desktop.
$.ajax({
url: '/URL/',
type: 'POST', /* POST/GET */
dataType: 'json', /* xml/html/script/json/jsonp */
data: form_data,
crossDomain: true,
success: function(data, textStatus, xhr) {
/* success */
},
error: function(xhr, textStatus, errorThrown) {
/* error */
},
complete: function(xhr, textStatus) {
/* when request is completed */
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment