I've got this code:
function someFunction(something1, something2) {
$.post("execute.php", { someData1: something1, someData2: something2 }, function(data) {
returnData = data;
});
return returnData;
}
Post function returns either false or true and I want this someFunction send this information further by return value, but it doesn't work. I'm guessing this return value returns before it posts so there's undefined, but I have no idea what to do about it.