Jump to content

XMLHttpRequest with PHP - IE Issues


freeze21

Recommended Posts

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');

    }

  }

Link to comment
https://forums.phpfreaks.com/topic/38783-xmlhttprequest-with-php-ie-issues/
Share on other sites

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.

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.