Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

getting json from response using getSync method

// assuming that the response is the following
{status: "ok", data: "value", data2: "value2"}
var r = dhx.ajax.getSync("server.php");
var t = dhx.s2j(r.xmlDoc.responseText); // convert response to json object
if (t != null && t.status == "ok") {
    // response is ok
}
Source by docs.dhtmlx.com #
 
PREVIOUS NEXT
Tagged: #json #response #getSync #method
ADD COMMENT
Topic
Name
6+6 =