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
Post a Comment