OAFC_Rob Posted September 28, 2011 Share Posted September 28, 2011 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); } Quote Link to comment https://forums.phpfreaks.com/topic/248006-xmlhtpp-issue-on-ie-7-8/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.