this current piece of script to confirm whether a user wants to log out is not fully working in Safari on Mac.
function log_out()
{
ht = document.getElementsByTagName("html");
ht[0].style.filter = "progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)";
if (confirm('Are you sure you want to log out?'))
{
return true;
}
else
{
ht[0].style.filter = "";
return false;
}
}
It works when the user confirm they want to logout, Ok, but when the user clicks cancel, they are still logged out.
Any ideas?
Thanks in advance!
Put the return instruction in front of the log_out call
<a class="rnavtab" href="?do=logout" onclick="return log_out()">Log out</a>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With