Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Miguel Lopez on Sep 12, 2007 11:50
open dhtmlx forum
How can catch the dhtmlXgrid error ?

Answer posted by Stanislav on Sep 13, 2007 12:51
The inner errors can be catched in next manner

function myErrorHandler(type, desc, erData){
    //custom code can be placed here
    return false;
}
dhtmlxError.catchError("LoadXML", myErrorHandler);

The array contains additonal data related to error
    erData=[xmlHttpRequest , object]

First element - xmlHttpRequest object, which contain all data requested
from server.
Second element - dhtmlx object, component which throw error while
loading.

You can get any additional error info by checking xmlHttpRequest
properties (xmlHttpRequest.responseText for example )