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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.