get response (customize response)

I am using dhtmlx Scheduler using php. I am new for dhmlx scheduler .It work properly as per my requirement. In my condition when ever insert/update/delete a event in server side i am sending json as response but how can i get that response json.

In one of the example response as xml as follows.

By using get the action and event id,
dp.attachEvent(“onAfterUpdate”, function (id,action,tid,tag)
{

});

i want to send custom repose in xml/Json and as per the response perform the operation.
exmaple
<action type="" sid="" tid="" message="" attributes="" … />

s
Thank you for the reply… :slight_smile:

Hi,
you can add any custom attributes to the XML body of the response and then use onAfterUpdate or dataProcessor.defineAction to define a handler for such response. E.g.
XML:

<data><action type='warning' sid='1' tid='1' message="error text" ></action></data> JS:[code]dp.attachEvent(“onAfterUpdate”, function (id,action,tid,tag){
if(action == “warning”){
var message = tag.getAttribute(“message”);
alert(message);
}
});

//OR
dp.defineAction(“warning”,function(tag){
var message = tag.getAttribute(“message”);
alert(tag.getAttribute(“message”));
});[/code]

docs.dhtmlx.com/api__dataprocess … ction.html
docs.dhtmlx.com/api__dataprocess … event.html

Thank you for replay. I tried your solution and it worked. :slight_smile: