Different behavior of web app in different IE8 ver

2019-08-18 11:12发布

I am facing a strange issue of different behavior of a same web application in different IE8 versions.One version is like IE 8 CO ( corporate administrator ) i.e version A and another is normal IE 8 version. i.e version B The issue is in version A, I am calling one cgi on the onload event which is responsible to flash a file on a board. But in vA it is not getting called at all which I can figure out from the logs of apache web server and also from internal logging methods. In case of vB, it is working fine and doing as expected.

Do you know what may be the [possible cause of this ?

Note - Both systems/Environment is are the same just one difference is of versions. Also this application is working in Firefox perfect;y.

Please help me on this as I have passed very much time on this and also searched a lot but not found even the cause of the same. Unless I can't find the way I can't proceed in my project.

I think that the vA (corporate administrator ) of IE8 may be denied for the file transfer for security reasons ???.

Thanks a lot in advance...

1条回答
Viruses.
2楼-- · 2019-08-18 11:30

I found the solution...!!! It was one security setting in IE8 that caused this problem. It was like - Tools -> Internet Options -> Advance -> security -> "Enable Native XMLHttp Support".When it is disabled then IE was not able to send XHR to server so it was hanged. I resolved this by using the following code :

 function getXMLHttpRequest() {
        var xmlHttpReq;
        if (window.XMLHttpRequest) {
            xmlHttpReq = new window.XMLHttpRequest;
        }
//    Instead of using else if(window.ActiveXObject("Microsoft.XMLHTTP")){
//        xmlHttpReq = new window.ActiveXObject("Microsoft.XMLHTTP");
//}
//I used this :-
        else {
            try {
                xmlHttpReq = new window.ActiveXObject("Microsoft.XMLHTTP");
            }
            catch(ex) {
                alert('Exception in initializing the XMLHttpRequest object '+ex.toString());
                return null;
            }
        }
        return xmlHttpReq;
    }
查看更多
登录 后发表回答