Opened 12 years ago
Closed 12 years ago
#11179 closed bug (worksforme)
Why success event in jquery.ajax is fired when the ajax status code is 0?
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
If the destination is unreachable I think that it is an error event. only the status code 200 should be the success event.
Thanks.
Change History (3)
comment:1 follow-up: 2 Changed 12 years ago by
Owner: | set to aldaruru@… |
---|---|
Status: | new → pending |
comment:3 Changed 12 years ago by
Resolution: | → worksforme |
---|---|
Status: | pending → closed |
Here is a corrected fiddle, but it seems to return 200 as expected.
As I mentioned, one reason for an $.ajax() call returning success on 0 is that you have specified isLocal: true
in the ajax settings. Ask for help on a forum until you've isolated it to a true bug.
Note: See
TracTickets for help on using
tickets.
Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket!
Additionally, be sure to test against the "jQuery (edge)" version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to begin.
Sounds like you may have isLocal set.