Hello,
I have an Ajax script I am using that works perfect in firefox, but the request isn't working in IE. I thought I had it set up to handle the browser differences...
What am I doing wrong?
Code:<script type="text/javascript"> function showPreview(spnsr, pgm, cmp) { var xmlHttp; try { // Firefox, Opera 8.0+, Safari xmlHttp=new XMLHttpRequest(); } catch (e) { // Internet Explorer try { xmlHttp=new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlHttp=new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) { alert("Your browser does not support AJAX!"); return false; } } } xmlHttp.onreadystatechange=function() { if(xmlHttp.readyState==4) { document.getElementById("announcementPreview").innerHTML=xmlHttp.responseText; } if(xmlHttp.readyState==1 || xmlHttp.readyState==2 || xmlHttp.readyState==3) { var loadingImg = '<img src="images/loadingAnimation.gif" alt="Loading.." style="margin:auto;">'; document.getElementById("announcementPreview").innerHTML=loadingImg; } } var appendString = "?spnsr="+spnsr+"&pgm="+pgm+"&cmp="+cmp; xmlHttp.open("GET","showAnnouncement.php" + appendString,true); xmlHttp.send(); } </script>







Bookmarks