I have a link on my website like following and when I click on the link and user confirms to logout and based on my function it should logoff from
the current website and open up the new website window (which is working fine when user says yes).
The problem is, when user cancels from the alert box as per the code below, it is still opening up the new website which I don't want.
Is there anyway I can stop going/directing the user to new website when user cancels?
" title="Access abcd website" target="_blank" onClick="myFunction()">Cli
ck Here to go to ABCD Website</a>
if (confirm("Are you sure you want to logoff and go to ABCD website?") == true)
location.href = '/logoffpage.cfm?goto=loginpage';
Thanks in advance
Appreciate your help as this is little time sensitive.