It seems as if the "then" callback is not firing when a Deferred object is "rejected". It was my understanding "then" should be executed whether the Deferred resolves or rejects.
Here ...
// Assign handlers immediately after making the request,
// and remember the jqxhr object for this request
var jqxhr = $.ajax({ url: "example.php" })
...
I have a chain of ajax requests that support a series of cascading drop down select lists. When you select a value in the 1st drop down, a request is fired ...
When multiple Deferred objects are passed to jQuery.when, the method returns the Promise from a new "master" Deferred object that tracks the aggregate state of all the Deferreds it ...
I am using deferreds in a public API as the return values for methods that spawn AJAX requests. This has a number of advantages, most notably allowing users of the API to respond to both success and error states of the request in an elegant manner. However I've been facing one major issue with this pattern: there is default behavior that ...
I've been coding some deferred objects which wrap an AJAX call, but where I need $.ajax's ".complete()" functionality too. As I have to create my own $.Deferred to return to the caller I have to replicate the way that $.ajax creates a separate deferred object that's only used to signify completion.