newbie question on drag and drop

Hi,

I am really new to DHTMLXscheduler, so please if this is a stupid question don’t shoot me :slight_smile:

I am just trying out the demo files, and so far I understand you need to use the dataprocessor object to save the events serverside.

So I have included:

//all the initialization and setup are done before

scheduler.load("http://localhost:12342/getEvents");
scheduler.init('scheduler_here',new Date(2009,5,30),"unit");

var dp = new dataProcessor("http://localhost:12342/saveEvents");
dp.init(scheduler);

So my server is listening on port 12342, ready to receive changes on the scheduler and store them in the database.

If I create a new event, I receive the event and all its data so I can store it on the database. However the server does not get called when an event is changed (via the popup or via drag and drop) or when an event is deleted.

In the samples provided, I have the same behavior… so my only conclusion is: I don’t get it right…

Thanks in advance!

Andries

you need to use the dataprocessor
It is one of possible solutions, you can use db-less saving through export functionality or implement your own server side logic and attach it to scheduler through events.

when an event is changed (via the popup or via drag and drop) or when an event is deleted.
Dataprocessor expect a special response to confirm correct operation. If it was not received, all further operations with the same element will be ignored.

docs.dhtmlx.com/doku.php?id=dhtm … e#response

( by the way - by using connectors you can create a server side code in few lines )

ok, I think I understand: my server side code has to send the correct result back, so that the dataprocessor knows it is well saved. Is this correct?

This will probably also explain the empty dialog box popping up in the examples after loading and creating an event.

I will give it a try. Thanks !

Is this correct?
Yep

If response can’t be parsed correctly, it just shown in debug-alert ( empty alert in your case )