Mozilla VPN is currently experiencing an outage. Our team is actively working to resolve the issue. Please check the status page for real-time updates. Thank you for your patience.

This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

تلاش سپورٹ

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

مزید سیکھیں

ajax.status not working with firefox 6 - always returns status 0. This feature is basic, was working with firefox 5. What have you done and how can I make my website work again with ajax?

more options

I am developing websites using ajax. With firefox 6 ajax.status is only returning 0 not 200. I have not changed my code. It works with earlier versions of Firefox and with Chrome 13. I have defined a javascript variable ajax1 at beginning of program, typical procedure.

function ajaxFunction(){ var ajaxRequest; // The variable that makes Ajax possible!

 if (window.XMLHttpRequest) {
  // IE 7, Mozilla, Safari, Firefox, Opera, most browsers:

ajaxRequest = new XMLHttpRequest();

  } else if (window.ActiveXObject) { // Older IE browsers
   	// Create type Msxml2.XMLHTTP, if possible:

try { ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e1) { // Create the older type instead: try { ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e2) { } } } // Send an alert if the object wasn't created. if (!ajaxRequest) { alert ('Some page functionality is unavailable.'); } else {

return ajaxRequest;
}

var ajax1 = ajaxFunction(); var ajax2 = ajaxFunction();

This code below does not not work because firefox 6.02 is not returning anything but 0 for the status: if (ajax1.readyState == 4) && (ajax1.status == 200){

You have done something with your javascript engine that is causing this problem. How can I get ajax to work using post method - am using code like this which WAS working in earlier versions of firefox:

var post_data = 'email=' + encodeURIComponent(email);              
    ajax1.open('post', 'check_4_company.php',true);
    ajax1.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    ajax1.onreadystatechange = handle_mope;
    ajax1.send(post_data);
    return false;

This code is very basic, have used it hundreds if not thousands of times successfully!

But firefox 6 has messed things up!

Please advise!

jimfre bacal

I am developing websites using ajax. With firefox 6 ajax.status is only returning 0 not 200. I have not changed my code. It works with earlier versions of Firefox and with Chrome 13. I have defined a javascript variable ajax1 at beginning of program, typical procedure. function ajaxFunction(){ var ajaxRequest; // The variable that makes Ajax possible! if (window.XMLHttpRequest) { // IE 7, Mozilla, Safari, Firefox, Opera, most browsers: ajaxRequest = new XMLHttpRequest(); } else if (window.ActiveXObject) { // Older IE browsers // Create type Msxml2.XMLHTTP, if possible: try { ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e1) { // Create the older type instead: try { ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e2) { } } } // Send an alert if the object wasn't created. if (!ajaxRequest) { alert ('Some page functionality is unavailable.'); } else { return ajaxRequest; } var ajax1 = ajaxFunction(); var ajax2 = ajaxFunction(); This code below does not not work because firefox 6.02 is not returning anything but 0 for the status: if (ajax1.readyState == 4) && (ajax1.status == 200){ You have done something with your javascript engine that is causing this problem. How can I get ajax to work using post method - am using code like this which WAS working in earlier versions of firefox: var post_data = 'email=' + encodeURIComponent(email); ajax1.open('post', 'check_4_company.php',true); ajax1.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); ajax1.onreadystatechange = handle_mope; ajax1.send(post_data); return false; This code is very basic, have used it hundreds if not thousands of times successfully! But firefox 6 has messed things up! Please advise! jimfre bacal

تمام جوابات (1)

more options

Further discussion here: ajax problems with firefox 6 at mozillaZine Forums