function logout() { jConfirm('Do you really want to logout?', 'Logout', function(r) { if (r) window.location.href = "logout.php"; }); }
EDIT for comments:
function sid(id){ $_sidId = id; jConfirm("Delete System ID for " + id + "?", 'Delete Sid', function(r) { if (r){ window.location.href = "del_sid.php?id=" + $_sidId; } $_sidId = null; }); }
When I saw the script better, it would be advisable to remove the variable "$ _sidId" from "if", regardless of the answer, it should clear the variable.
source share