In my addons I always used new XMLHttpRequest () and it worked perfectly. Now all requests ajax stopped working.
Currently new XMLHttpRequest () is causing the following error: ReferenceError: XMLHttpRequest is not defined
So I changed my code to:
try {
var XMLHttpRequest;
if (typeof(XMLHttpRequest) == "undefined")
XMLHttpRequest = content.XMLHttpRequest;
}
catch (e) {
alert(e);
}
var xmlhttp = new XMLHttpRequest();
...
Sometimes the request usually works, but sometimes not.
The code "alert(e);" is never executed, then there is no error there.
I can not understand why sometimes it works and sometimes not. Previously I used only var xmlhttp = new XMLHttpRequest(); and always worked.
Now how do I create a new ajax request?