Possible bug found in dhtmlxError.catchError in IE

I have a web application that is using the loadXML to retrieve grid data as xml. In this application I also define a custom function to handle the the dhtmlxError, dhtmlxError.catchError(“ALL”, viewByErrorHandler); The error handling on the server side returns a JSON object that contains details of the error encountered on the server side during request processing.

The code for the viewBYErrorHandler is as follows:


function viewByErrorHandler(type, desc, erData){

    xmlHttp = erData[0];

    msgData = xmlHttp.responseText.evalJSON(true);

    if ( msgData == null ){

        return false;



        if ( msgData.dataErrorOccurred ){

            msgText = msgData.messageText;

            if ( msgText == null ){

                return false;



            if ( msgData.type == ‘noLabelsFound’){

                msgblock = “”;

                msgblock = msgblock + msgText;

                msgblock = msgblock + “


                if ( $(‘application-status’) != null ){

                    $(‘application-status’).innerHTML = msgblock;                    




    } catch (e){

        return false;


    return false;



The issue I am running into is once the viewByErrorHandler is called, any subsequent call to the load the grid using loadXML results in the prototype.js evalJSON function being called to process the returned response data. Since this is not a JSON object but XML, it results in an exception stating the repsonse data is not a valid JSON object.

If I change all my loadXML calls to use the load(url, callback_function, “xml”), everything works fine.

Also, please note that this only happens in Internet Explorer and not in Fire Fox.


please, see the answer here dhtmlx.com/docs/products/kb/inde … al&q=11374

Please be sure that xml data is sent with correct type
In case of different content type , there is a possibility of such issue in IE.

Attached dhtmlxcommon.js contains fix for the possible issue, you can try to use it instead of the original one.

dhtmlxcommon.zip (6.61 KB)

Thanks for the quick response.  The Content-type:text/xml was the root of the issue.  The server side code
was not setting the response type to text/xml.  After making this change, everything appears to be functioning
correctly in both IE and Firefox.