I use Alertify jQuery for my dialogs. The problem is that confirmation after confirmation does not work:
<img onclick="go()" src="test.jpg"> <script type="text/javascript"> // confirm dialog function go(){ alertify.confirm("Reset password?", function (e) { if (e) { // user clicked "ok" secondconfirm(); } else { // user clicked "cancel" } }); } function secondconfirm(){ alertify.confirm("Password is changed<br>Mail it to the user?", function (e) { if (e) { //Done alertify.success("Password reset and mailed to user."); } else { // user clicked "cancel" alertify.success("Password reset."); } }); } </script>
I want to use it like that, because on the basis of clicking yes or no, I need to ask a second question. If I use it like this, the second confirmation dialog will appear very briefly and then pop out of the screen. Even more annoying, the DIV that covers the rest of the screen stays in place, so I can't even use the nymore site without refreshing the entire page. I suppose this has something to do with the fact that the first dialogue disappears and also hides the second.
How to solve this?
source share