I have the following code:
function doDialogAjax(link: Link. modal: Modal) {
$.ajax( link.Url,
{
cache: false,
dataType: 'html'
})
.done(onDialogDone)
.fail(onDialogFail);
}
function onDialogDone(data: any, textStatus: string, jqXHR: JQueryXHR) {
var x = data;
// I need to access link.abc and modal.def properties here
}
How can I send the link object to my onDialogDone() function? I
seem to remember there is some way to send specify context information objects but I can’t find any examples of this.
You could use the context-key to change the value of
thisinside your callback: