function MakeJsonRequest() {
JsonRequest.setRequestHeader("Content-type", "application/json");
JsonRequest.send(Data);
JsonRequest.onload = function() {
ProcessJsonResponse(this.responseText);
}
}
// The SomeOtherFunction resides in a separate class.
var SomeObject = {
ProcessJsonResponse: function() {
return data;
}
}
- What will be the return value of my MakeJsonRequest function?
- Is it possible to return the value from the onLoad call of the JsonRequest?
I need to execute some logic in a different class and then return the value through the MakeJsonRequest function