i have the following ajax.actionlink:-
@Ajax.ActionLink("Delete", "Delete", "Answer",
new { id = answer.AnswersID },
new AjaxOptions
{
OnBegin = "deleteconfirmation1",
HttpMethod = "Post",
UpdateTargetId = @answer.AnswersID.ToString(),
OnSuccess = "deleteconfirmation",
})
and the following deleteconfirmation1.js that should display a confirmation message before executing the ajax call:-
function deleteconfirmation1() {
jConfirm('Deletion Confirmation', 'Are you sure you want to delete this Answer');
}
the problem that i am facing is that the onbegin confiramtion will not prevent the onsuccess script from being executed even if the user click on the cancel button? so how i can make the OnBegin to work as a confirmation stage, so the application will wait for the user selection either "Ok" or "cancel" before processding with the ajax call or not !!! ?? BR