Hi.
I'm tring to hold the user in a specific page therefore I catches the onBeforeUnload BODY event.
The code I wrote is something like the following:
<script language='JavaScript'>
function BeforeUnload(){
if(confirm("Are you sure?")){
return true;
}
return false;
}
</script>
<body onBeforeUnload='return BeforeUnload();'>
When I try to move away from the page I'm in the browser popup the confirm box and then another browser confirm box.
Can I somehow cause the browser not to popup the second confirm box?
Is there is any better way to do so?
Thanks in advanced
Yossi