I'm trying to simply get a response from a jQuery $.get() call, and store it to a variable. It's proving to be much more difficult than I would have thought. Here is my code:
var response;
$.get(("action.php?action=addFolder&folderName=" + input),
function(data, status){
response = data
}
);
return response;
But response is always undefined or null. How can I fix this?