ajax synchronous and asynchronous code 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;
}