-1

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 ...)

olivetree123
  • 173
  • 3
  • 13

1 Answers1

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