I am working on old AJAX code written in the dark dark days before jQuery. Oddly enough, he has worked perfectly for many years, until today, when he suddenly stopped shooting with his callback. Here is the basic code:
var xml = new XMLHttpRequest();
xml.open("GET", myRequestURL, true);
xml.onreadystatechange = function() { alert ('test'); };
xml.send(null);
Checking the Firebug console, the request is sent without any problems, and it gets the correct XML from the request URL, but the function onreadystatechangedoes not work at all. There are no javascript errors or anything else strange in the system.
I'm sorry that I can't just rewrite everything using jQuery, but now I don't have time. What could be causing this problem?
Further update - I was able to test my code in another browser (FFx 3.0) and it worked there, so this is a problem with my browser. I am running Firefox 3.5b4 on Vista, and I tried it now when all my add-ons are disabled without any luck. This still bothered me a lot because yesterday I was working on this site (with the same browser setting) and there were no problems at all ...
In fact, I just looked around in the Addons window and saw that Firebug was still on. If I disable Firebug, it works fine. If I turn it on, it will break. Firebug version 1.40.a31
source
share