Customizing Invalid XML Error for Data Grid


We are using the standard grid for a web application test.



Occasionally we get an “Invalid XML” Alerrt when we periodiclyy refresh the data in the grid using the parseXML call.



 



How can I handle this error more elegantly and stop polling of the server.  In otherwords how do i prevent this alert box from coming up, and write code to show what is wrong with the xml and stop polling?



 



Thanks a lot for your product - it is very cool.

You can catch error and prevent error message by using default error handling routine.

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 )