Given this (which for brevity, I have trimmed out all the .ajaxSetup()/.fail()/URL creation, etc, which all work fine):
function isGoodPIN(pin) {
var result = "";
:
:
var ajaxResponse = $.get(
cURL,
function (data) {
result = (data=="OK"? true: false);
// result is local to .get() here...
}
)
:
:
//... so result is "" here.
return (result);
}
Is there a way to get the value of result
from inside the .get() call's callback function to result
in the isGoodPIN() function?