I have the following:
$.ajax(link.href,
{
cache: false,
dataType: 'html'
})
.done(onDialogDone)
.fail(onDialogFail);
This works fine and onDialogDone is called. However what arguments should I expect to see supplied to the onDialogDone and what should I expect to see for onDialogFail.
The reason I am asking is because I use typescript and I want to supply the correct arguments when I define my onDialogDone and onDialogFail.
The arguments for
.done()and.fail()are the same as the arguments for the correspondingsuccess:anderror:parameters for the$.ajax()function, namely:and
For the purposes of typescript,
textStatusanderrorThrownare strings,jqXHRis anObject, anddatadepends on what the remote server sends you.