make a syncronus ajax call 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;
}