views:

299

answers:

1

I have a simple jQuery AJAX funciton:

$.ajax({ 
 type: "GET",
 url: "json/" + address,
 dataType: "json",
 timeout: 1000,  
 data: "username=" + username + "&paging_limit=" + paging_limit,
 success: function(json){alert("somthing")},
 error: function(){alert("somthing else")}
});

I get the following error in Firefox (3.6) when the request times out,

setting a property that has only a getter
[Break on this error] null}};try{var h=x.abort;x.abort=funct...return!a.status&&location.protocol===

The only fix is that of not setting a custom 'timeout' setting.

Has anyone come across this before, should I be concerned, is there a solution?

Thanks in advance.

+2  A: 

This is because JQuery is attempting to set the readyState of the XHR object: xhr.readyState = 0; in its error handling code. Essentially it is trying to replace the abort logic of the XHR with its own. It does not look like this is allowed in Firefox 3.6. I'll check the JQuery source repository to see if this is a known bug.

UPDATE: It is: Bug report

This bug was fixed in JQuery 1.4.1.

Plynx
Thanks a million, that was destroying my noodle. Just getting plain old warnings again :)
tim