I have a situation in which my ajax calls must perform in a particular order. I have used jQuery Deferred objects in other situations, but cannot seem to find a way to make
Couldn´t add a comment for some reason to the above answer.
So i add my comment here. The above answer will only work if the ajax calls are fast and returns BEFORE the return dfd.promise().
I have the same problem. And as you can see. The returned deferred object states that it is "pending": http://jsfiddle.net/BtEKa/