The following code displays confirmation windows when you click the Delete user link:
<a href="delete_user.php?id=123" onclick="return confirm('Are you sure?');">Delete user</a>
In this case, when the OK button is pressed, the delete_user.php link will be executed? id = 123. When the Cancel button is clicked, nothing will happen.
I would like to do the same with Bootbox.
<a class="alert" href="list_users.php?id=123">Delete user</a> <script src="bootbox.min.js"></script> <script> $(document).on("click", ".alert", function(e) { e.preventDefault(); bootbox.confirm("Are you sure?", function(result) { if (result) { </script>
What to do in if (result) and else operations?
Oualid
source share