Saikiran Gst

Saikiran Gst

  • NA
  • 148
  • 23k

CHECK TOOL LOGOUT OR NOT BEFORE CLOSE TOOL IN BROWSER

Sep 6 2014 8:29 AM
HI Every one

                Ineed small help from u guies in my tool user with out logout and if he close tool in browser  means then should raise error message please logout and if he loged out and closing browser tab then should not raise error message and close the browser using script please help guies


        I am done using script but it was getting for evry page when they close even logout page also and asking leavepage or stay in page leavein page click means even user not loged out also closing but i need logout then only close browser 


code:


        code i used


<head runat="server">
    <title></title>
    <script type="text/javascript">
        window.onbeforeunload = confirmExit;
        function confirmExit() {
            return "Before closeing Tool Logout and Close";
        }

    </script>
</head>
<body onbeforeunload ="confirmExit();">




Regards
SAIKIRAN GST

Answers (1)