Sök i support

Akta dig för supportbedrägerier: Vi kommer aldrig att be dig att ringa eller skicka ett sms till ett telefonnummer eller dela personlig information. Rapportera misstänkt aktivitet med alternativet "Rapportera missbruk".

Learn More

why is new XmlHttpRequest() throwing an exception in Firefox 4.0.1

  • 1 svar
  • 2 har detta problem
  • 1 visning
  • Senaste svar av cor-el

more options

the following javascript has been working in prior version of Firefox (3.x) but is throwing an exception in Firefox 4.0.1 oddly enough the request object is being created in the try block but then is nulled in the catch block

   var xmlHttp;
   // branch for native XMLHttpRequest object
   if(window.XMLHttpRequest) {
   	try {

xmlHttp = new XMLHttpRequest();

       } catch(e) {

xmlHttp = null;

       }
   // branch for IE/Windows ActiveX version
   } else if(window.ActiveXObject) {
     ....
the following javascript has been working in prior version of Firefox (3.x) but is throwing an exception in Firefox 4.0.1 oddly enough the request object is being created in the try block but then is nulled in the catch block var xmlHttp; // branch for native XMLHttpRequest object if(window.XMLHttpRequest) { try { xmlHttp = new XMLHttpRequest(); } catch(e) { xmlHttp = null; } // branch for IE/Windows ActiveX version } else if(window.ActiveXObject) { ....

Alla svar (1)

more options

A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.
The helpers at that forum are more knowledgeable about web development issues.
You need to register at the mozillaZine forum site in order to post at that forum.

See http://forums.mozillazine.org/viewforum.php?f=25