synchronous and asynchronous ajax example
Example: synchronous ajax
function getRemote() {
return $.ajax({
type: "GET",
url: remote_url,
async: false
}).responseText;
}
function getRemote() {
return $.ajax({
type: "GET",
url: remote_url,
async: false
}).responseText;
}