on unload event of browser
<p>HI </p>

<p>I wanna timeout session from client page,i tried below code but not able to execute code need some help of how i can handle OK or CANCEL events from user</p>

<pre><code>&lt;script&gt;

 function onBeforeUnloadAction(){

    return "Would u like to discard Changes";

 }

 window.onbeforeunload = function(){
   if((window.event.clientX&lt;0) ||
      (window.event.clientY&lt;0))
{
     return onBeforeUnloadAction();

   }
 }

 &lt;/script&gt;
</code></pre>
