Jquery – Access to XMLHttpRequest.statusText will cause exception when it fails

ajaxexceptionjquerystatus

$.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

Best Answer

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); }
});