I have the following:
$.ajax(link.href,
{
cache: false,
dataType: \'html\'
})
.done(onDialogDone)
.fail(onDialogFail)
The arguments for .done()
and .fail()
are the same as the arguments for the corresponding success:
and error:
parameters for the $.ajax() function, namely:
.done( function(data, textStatus, jqXHR) { ... } );
and
.fail( function(jqXHR, textStatus, errorThrown) { ... } );
For the purposes of typescript, textStatus
and errorThrown
are strings, jqXHR
is an Object
, and data
depends on what the remote server sends you.