I need to stop sending ajax request of an Ajax.ActionLink for a while on OnBegin and continue the request if confirm alert is true. In below code i could abort ajax request, is there any way to resend it using its own methods.
beforeDelete: function (x, y) {
x.abort();
bootbox.confirm("Are you sure you want to delete this?", function (result) {
if (result) {
//process again
}
});
}
Edit: I have achieved it, Thanks Guruprasad.
var prevDel = true;
function beforeDelete(x, y) {
if (prevDel) {
x.abort();
bootbox.confirm("Are you sure you want to delete this?", function (result) {
if (result) {
prevDel = false;
$.ajax(y);
} else {
prevDel = true;
}
});
} else {
prevDel = true;
}
}