Can simplemodal confirm hold the function? Like alert(),the codes after the alert() will not be runned before you click it . I tried , but it doesn't work like this. (My English is poor , so ...)
Asked
Active
Viewed 31 times
1 Answers
0
Simple model has 2 parameters. confirm(message, callback). Pass your code as JS function to call back parameter.
confirm("Are you sure you want to logout", function () {
//Your code here
window.location.href = '@Url.Action("LogOff", "Account")';
});

Ande
- 11
- 1
- 5