scheduler and node js when disconnected?

Hi DHTMLX team,

We are currently using DHTMLXScheduler with nodeJS to sync scheduler display in client PCs. And it is working great :smiley: .

However if scheduler at client side is disconnected from server (like internet connection is lost, Wireless connection lost etc. on client’s side), client can still work with scheduler on his/her side even though the data is not being synchronized or updated at other clients who are connected to same nodeJS server. To user it seems like it is working but in reality other clients do not see the updates.

How can we inform client that he/she is not connected to nodeJS server any more?

Thanks in advance

Reference url regarding Node JS: docs.dhtmlx.com/doku.php?id=dhtm 
 ive_update

You can add the next code after dp.live_update call

dp._live_up.client.bind('transport:down', function() { // client is offline dhtmlx.message("You are offline"); });

Thanks a lot 
 I will try this out right away

Hi again,

Thanks Stanislav for the update.
I was trying out the solution that was mentioned. Not successful yet. May be it is related to the version of DHTMLX control that I have. Which version of DHTMLX control supports this i.e [ dp._live_up.client.bind(‘transport:down’, function() 
 ].
It will be great if you can also point to some sample that uses this.

Thanks

Unfortunately I don’t have a sample.

dp._live_up returns Faye object, and you can use all events and methods of Faye library
faye.jcoglan.com/browser/transport.html

Try to update faye module for nodejs, maybe you are using outdated version.

I recently looked into firebug to check why dp._live_up did not work.
Seems like correct variable name is: dp._live_upd (i.e. ends with ‘d’).
Found the client variable as well, i.e. dp._live_upd.client
However could not find ‘bind’ or ‘on’ functions within client.

Following functions did not work yet:

dp._live_upd.client.bind(‘transport:down’, function() {
// client is offline
dhtmlx.message(“You are offline”);
});

Or from: faye.jcoglan.com/browser/transport.html

dp._live_upd.client.on(‘transport:down’, function() {
// client is offline
dhtmlx.message(“You are offline”);
});

Any idea why this could be the reason or which function call to use?

Thanks,

Simsim