im planning of catching the loadXML error…
is there a way to know if the error has occured?like events or anything…thanks…
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 )
The moment when loadXML finished loading can be catched by using onXLE event of component.
Hi,
i used
function myErrorHandler(type, desc, erData){
//custom code can be placed here
return false;
}
dhtmlxError.catchError(“LoadXML”, myErrorHandler);
to handle error durig loadxml, i just cant seem to return the frid object…
i have 2 grids on my page grid1 and grid 2…what im trying to do is when the error occurs i try to reload the grid which caused the error…
i do this by using erData, as youve said the second element is the object… so inside myErrorHandler i have a statement like erData[1].loadXML(“xml.xml”) (2nd element), something like that but the loadXML does not reload again…when i try to alert(erData[1]) it returns [object]…
hope you can shed light on this…
tnx…