What I am trying to do is to get ajax response
out of the success
callback.
var form_data = new FormData($('#formDatas')[0]);
$.ajax({
type:'POST',
url:'/some/url/',
processData: false,
contentType: false,
async: false,
cache: false,
data : form_data,
success: function(response) {
var fonts = response.fonts;
}
});
alert(fonts);
I am aware that the code above does not work since the variable is locally defined inside its own function, but how can I get it out ?