I have some problem with \[code\]@Ajax.ActionLink\[/code\]I want to show confirm dialog, and yes, i know that i can do just:\[code\]@Ajax.ActionLink("Do it!", "Delete", new AjaxOptions(){ Confirm = "Are you sure?" });\[/code\]but I want to have my own MyConfirm dialog
I use alertify.so my code is:\[code\] @Ajax.ActionLink("Do it!", "Delete", new AjaxOptions(){ OnBegin="return MyConfirm();"})\[/code\]my JavaScript function:\[code\]function MyConfirm() { alertify.confirm("Do you really want to do that??", function (e) { if (e) return true; else return false; }); }\[/code\]But if I in my MyConfirm() function just return 'false' Ajax request stop and my "Delete" action doesn't start (so it works how it should works). but in my example function MyConfirm() show me my MyConfirm dialog but it also immediately retruns true and "Delete" action begins! How to deal with that?
I use alertify.so my code is:\[code\] @Ajax.ActionLink("Do it!", "Delete", new AjaxOptions(){ OnBegin="return MyConfirm();"})\[/code\]my JavaScript function:\[code\]function MyConfirm() { alertify.confirm("Do you really want to do that??", function (e) { if (e) return true; else return false; }); }\[/code\]But if I in my MyConfirm() function just return 'false' Ajax request stop and my "Delete" action doesn't start (so it works how it should works). but in my example function MyConfirm() show me my MyConfirm dialog but it also immediately retruns true and "Delete" action begins! How to deal with that?