Stop window.event with Javascript window.confirm?
<p>I am trying to have a confirm box come up when the viewer tries to close the window, that allows the user to stay on the current page (by click Cancel), or continue closing the window (by click OK).</p>

<p>My code is as follows...</p>

<pre><code>&lt;script&gt;     
    function confirm_exit(){
        var message = window.confirm("My message.");
        if (message == true) {
            // Output when OK is clicked
            window.close();
        } else {
            // Output when CANCEL is clicked
            ???????
        }
    }
&lt;/script&gt;
</code></pre>

<p>I am not sure because either one I click closes the window. I need Cancel to remain at the current page, and OK to close the window or proceed with the users window.event. </p>

<p>Hope this makes sense.</p>
