Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Jan 03, 2008 07:55
open dhtmlx forum
Customized error message for dynamic loading

Hi,

We are using an authenticated Ajax call for populating a treegrid. If user try to refresh their grid after authentication cookie had expired (1 hour expiration), XML call to the back-end will fail and a pop-up with "Incorrect XML" message would be displayed on the screen. Is there a way to customize this message (preferably on the fly)? Instead of the "Incorrect XML", we would like display "Your session had been expired. Please try to relogin".

Thanks,
Answer posted by Stanislav on Jan 04, 2008 05:53
The "Incorrect XML" message is inner error, which can be catch in next way

dhtmlxError.catchError("ALL",function(){
    //any custom messages here
});


The function attached as error handler receive additional params, which can be used to detect problem details ( it possible to get exact text of server side response )