Please note that some info is not up-to-date. Under “Making generic Ajax requests with $.ajax()” complete, error, success
callback methods are being presented. These will be deprecated
in next jquery version (1.8). Better to use done(), fail() that can be chained due to the fact $.ajax now returns a jquery promise.
Deprecation Notice: The jqXHR.success(), jqXHR.error(), and jqXHR.complete() callbacks will be deprecated in jQuery 1.8. To prepare your code for their eventual removal, use jqXHR.done(), jqXHR.fail(), and jqXHR.always() instead.