i got a simple onbeforeunload function but I'm seeing that is being fired everytime, even when log out. Is there any chance to avoid from firing when log out?
Thanks.
i got a simple onbeforeunload function but I'm seeing that is being fired everytime, even when log out. Is there any chance to avoid from firing when log out?
Thanks.
You can add Conditions before you Call your window.onbeforeunload
if(condition && condition)
{
window.onbeforeunload = function(e) {
return 'Dialog text here.';
};
}