php - How to get rid of synchronous XHTML request? -


how rewrite code can use json data retrieved test2.php?

function drawchart4() {     var jsondata = $.ajax({         url: "/master/test2.php?zoekopdracht=ceremonie",         datatype: "json",         async: false     }).responsetext;      var object = $.parsejson(jsondata); 

your question not clear, maybe looking for:

$.ajax({     url: "/master/test2.php?zoekopdracht=ceremonie",     datatype: "json" }).done(function(jsondata){     // data     console.log(jsondata); }).fail(function(){     // react on error     console.log("whoops, failed!"); }); 

this assumes using jquery js library on client side, code implies.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -