freeze21 Posted February 16, 2007 Share Posted February 16, 2007 the following is working fine with Firefox but it only will update once with IE6 and IE7, and then continues to return the same page every time its called. any ideas? Thanks ---------------------------- var xmlhttp = null function updatePlayer() { // alert("Updating Player"); if(xmlhttp==null){ // alert("IS NULL"); xmlhttp = FactoryXMLHttpRequest(); } else if(xmlhttp){ // alert("is aborting"); xmlhttp.abort(); } if(xmlhttp){ // alert('is getting'); xmlhttp.open('POST', 'update.php', false); xmlhttp.send(null); document.getElementById('my_div').innerHTML = xmlhttp.responseText; // alert ('response got'); } } Quote Link to comment https://forums.phpfreaks.com/topic/38783-xmlhttprequest-with-php-ie-issues/ Share on other sites More sharing options...
ToonMariner Posted February 16, 2007 Share Posted February 16, 2007 Thast because IE uses ActiveXObject instead - and this is ajax/js question not php. Quote Link to comment https://forums.phpfreaks.com/topic/38783-xmlhttprequest-with-php-ie-issues/#findComment-186432 Share on other sites More sharing options...
freeze21 Posted February 16, 2007 Author Share Posted February 16, 2007 FactoryXMLHttpRequest() returns an activeX object if its in IE. It works the first time, the 2nd, 3rd, .. Nth, calls though all return the same PHP page, not an updated one. I will try posting in a JS forum. I don't think its ajax related though because I don't think im using anything async. Is there a different way to set an innerdiv = a php page? That would be a better solution for me, but I can't seem to find another way to set it. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/38783-xmlhttprequest-with-php-ie-issues/#findComment-186445 Share on other sites More sharing options...
ToonMariner Posted February 17, 2007 Share Posted February 17, 2007 Does your browser detect any js errors? Quote Link to comment https://forums.phpfreaks.com/topic/38783-xmlhttprequest-with-php-ie-issues/#findComment-186723 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.