function get_new_project_id() {
function subFunction() {
$.ajax({
url: 'includes/ajax.php?request=create_untitled_project',
success: function(response) {
return response; // result is a number like 19
}
});
}
return subFunction();
};
var resultnumber = get_new_project_id();
this is probably one of the most basic questions... why isnt resultnumber 19? how can I do it so it can return a html or text value from function? sometimes i get xmlhttp request object. i just want a simple number to be returned.