Jump to content

XMLHTPP issue on IE 7 / 8


OAFC_Rob

Recommended Posts

When I load my page on IE8 on my computer it goes to the catch throwing back the error message javaScript isn't supported. But if I press F5 or the refresh button in IE it starts to work, or if I turn compatability view on, on use IE's web developers tool to set standards to IE8 or IE7. So I have no idea why this error is occuring.

 

Also to point out that it works fine in Safari and Firefox.

 

Coding below;

 

 

    $(document).ready(function()
    {
        try
        {  
            xmlhttp = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHTTP");   
        }
        catch(e) 
        {
            document.getElementById("dealResults").innerHTML = '<p>Your browser does not appear to support javascript.</p>';
        }
        genericGetData("./retrievedata.php","<?php if(!empty($_SERVER['QUERY_STRING'])) {echo $_SERVER['QUERY_STRING'];} ?>", "load");
    });

        function genericGetData(url, args, type) 
        {
            document.getElementById("loadingScreen").style.backgroundImage=((type == "load")? "url('../images/loadingPage.png')" : "url('../images/loading.png')");   
            document.getElementById("loadingScreen").style.display="block";   
            xmlhttp.open('get', url+'?'+args);
            xmlhttp.onreadystatechange = genericHandleResponse;
            xmlhttp.send(null);
        }

Link to comment
https://forums.phpfreaks.com/topic/248006-xmlhtpp-issue-on-ie-7-8/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.