views:

137

answers:

2
$.ajax(error:function(XMLHttpRequest, textStatus, errorThrown)
             { XMLHttpRequest.statusText })

Did someone also met this problem?

EDIT

I'm using Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.0.2) Gecko/2008091620 Firefox/3.0.2

A: 

Try changing XMLHttpRequest to something like 'e'. Might just be a naming conflict? Also, are you actually making a valid ajax call?

jQuery.ajax({ 
    url: "/file/location.php", 
    data: "param"+value,
    error: function(e){
        alert(e.responseText);
    }
    success: function(data) { alert(data); }
});
danrichardson
I changed it to 'xhr',but still happens.
Shore
A: 

What is your exception?

The statusText Property The statusText attribute represents the HTTP status code text and is also available only when the readyState value is 3 or 4. Attempting to access the statusText property for other readyState values raises an exception.

Firefox also throws exception if there was a lower level network issue with the request that caused the error. NS_ERROR_NOT_AVAILABLE

dhwang