Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

getJSON how to set async to false

$.ajaxSetup({
    async: false
});
var jsonData= (function() {
    var result;
    $.getJSON('data.txt', {}, function(data){
      result = data;
    });
    return result;
})();
alert(JSON.stringify(jsonData));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #getJSON #set #async #false
ADD COMMENT
Topic
Name
1+9 =