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
https://forums.phpfreaks.com/topic/74255-ajax-wont-work-in-opera/
Share on other sites

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.