Scheduler offline event handlers

I need to be able to handle network disconnection and situations where the client is offline. I tried using the onValidationError and onRowMark however the first event is never triggered and the second one is always called twice. We see the last parameter for onRowMark of type object, however we do not have any documentation for it. I have attached the code fragment below. Please advise as to how best to go about doing this.

Thanks for your help,
simsim

 // setup CRUD data processor
    myDP = new dataProcessor("/myApp/scheduler/eventsx.do");
    
    myDP.setTransactionMode("POST", true);
	myDP.live_updates("http://"+ location.hostname +":8008/sync");

   myDP.attachEvent("onValidationError", function(id, details){
        //custom code here
        alert("onValidationError");
    });
    
    myDP.attachEvent("onRowMark", function(id, state, mode, invalid){
        //custom code here
         alert("onRowMark: " + id + ", " + state + ", " + mode + ", " + invalid);
        return true;
    });

    myDP.defineAction("error", function(response) {
    alert("Network connection error: \r\n"+
        "Message [E100]: " +
        response.textContent);
        return false;
    });
myDP.defineAction("invalid", function(response) {
    alert("Network connection error: \r\n"+
        "Message [E200]: " +
        response.textContent);
        return false;
    });

You can try to use the code like next

function my_error_handler(type, name, data){ if(type=="LoadXML") alert("My error handler \n"+name+"\n Status:"+data[0].status); } dhtmlxError.catchError("LoadXML",my_error_handler);

The error handler will be called after any ajax operations, that will return invalid response ( it can be network error or major server side error )