Jump to content

ajax won't work in opera


gish

Recommended Posts

hi everyone

 

I have been doing ajax for a year now and with howto and examples I have put this script together and it has been running fine never an issue. but I download opera the other day and it will not work so is it written wrong. Can anyone see an issue. It will work in ie, firefox.

 

function checkResult1()
{
if (request.readyState ==4)
{
	 var randomDiv = document.getElementById("randompic");
 randomDiv.innerHTML = request.responseText;
}
}
function getNewXMLHttpRequest() {
  var findbrowser;
    try {
   findbrowser = new ActiveXObject('Microsoft.XMLHTTP');
    }
    catch(a) {
      try {
           findbrowser = new XMLHttpRequest();
      }
      catch (a) {
           findbrowser = false;
      }
    }
    return  findbrowser;
}

function getanewpicture() {
request = new getNewXMLHttpRequest();
var url ="randompic.php";
request.open("GET", url, true);
request.onreadystatechange = checkResult1;
request.send(false);
}

 

Anyone got any ideas.

gish

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.