I have seen lots of posts on stackoverflow regarding getting the returned value of an asynchronous call in a callback function but I would like to know if I could get the result without going much inside the callback.
For Eg: Current Scenario:
myFunc(arg1,arg2, mycallback);
..
function mycallback(values)
{
//Process values
alert(values);
}
What I would like to have:
var returnedValues = myFunc(arg1,arg2, function mycallback(values)
{
return values;
});
// Now I would to use the returnedValues here...
Is the above scenario possible? Kindly let me know.
Cheers.