Hi all, If I have the following ajax call (inside a function) how do I go about returning the 'test' variable, in this case a string for testing purposes? Currently i'm getting test is not defined.
function getMaps(){
mapID = "us";
$.ajax({
type: "GET",
url: "getMap.asp",
data: "mapID=" + mapID,
contentType: "application/json; charset=utf-8",
dataType: "json",
async: false,
success: function(response) {
var test = 'text string';
}
});
return test;
};