Basically, what I'm trying to do is this:
var mydata = null;
jQuery.get(ANOTHER_URL, function(data) {
mydata = data;
}).then(jQuery.get(parsingFunction(mydata), function(otherData) {/*do stuff with otherData*/}));
parsingFunction(notYetAnURL) {
/*does stuff with notYetAnUrl*/
return nowIsURL;
}
The issue is.. this doesn't work. When the second jQuery.get call happens, mydata appears to still be null. I'm new to Ajax and asynchronous programming in general, so I apologize if the question may seem dumb, but I really can't get out of this. Could anybody kindly help?