vogtster
asked on
How to conditionally cancel body onUnload
I am trying to cancel the window from unloading when the user responds Cancel to the confirm dialog, like this:
function doTest(){
return confirm('Clck Ok for next page or click Cancel to stay on this page.');
}i
<body onUnload="return doTest();">
This does not cancel the unLoad regardless of the choice.
function doTest(){
return confirm('Clck Ok for next page or click Cancel to stay on this page.');
}i
<body onUnload="return doTest();">
This does not cancel the unLoad regardless of the choice.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.