Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Stevo on Jul 11, 2008 05:57
open dhtmlx forum
[GRID] How to catch 'Incorrect XML' error?

When using grid I usually use following code

dhtmlxError.catchError("LoadXML", myErrorHandler);
function myErrorHandler(type, desc, erData){

return false;
}


to get rid of xml load errors when page is redirected during xml load. However this solution does not work
if I try using it with tree. It simply doesnt catch xml load error. Help!

Answer posted by Support on Jul 11, 2008 07:01
You can try to use
dhtmlxError.catchError("ALL", myErrorHandler);
function myErrorHandler(type, desc, erData){

return false;
}

The tree generates two errors - LoadXML and DataStructure, so you need to handle both, or just use ALL as parameter.
Answer posted by Stevo on Jul 11, 2008 08:00
Thank you. This was really helpful :)
One problem was those two errors instead of one. But it correcting it did not solve the problem completely. I solved it by moving that snippet of code to the very bottom of <body>.
Now it works like a charm