Skip to content

Instantly share code, notes, and snippets.

@zburgermeiszter
Created October 9, 2014 10:41
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 zburgermeiszter/f3fc5f91edee59e8e8be to your computer and use it in GitHub Desktop.
Save zburgermeiszter/f3fc5f91edee59e8e8be to your computer and use it in GitHub Desktop.
Synchronous AJAX
function synchronousAJAX(param) {
var result = false;
$.ajax({
url: myURL + '/' + param,
dataType: "json",
async: false,
success: function() {
result = true;
},
error: function() {
result = false;
}
});
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment