function saveCallerReference(callerReference){
$.getJSON('/index.php?r=site/AJAXsaveCallerReference', function(data) {
console.log(data);
return data;
});
}
Given the above, the line "return data;" never gets returned, when the function(data){} exits, where does that return go? I want my outer scope function, saveCallerReference, to return the value from the getJSON(). console.log() is printing correctly so I am getting the data.