0

Hi,
am not a experianced coder, would like to seek for help.
i would like to create a session logout.
a pop out appear which able to count 60 sec " Warning your eMyHome session will expire in 60 seconds. Do you wish to continue?"
with button continue & logout.
i would like below to be coded in my script.

  1. if click on continue it should appear after the 60 sec if session idle
  2. if click on logout go back to main page
  3. if nothing/no response then sys automatically show the main page after the session expired.

below is the code i use currently.
can anyone modify for me according to my above conditions.
Pls help?

<script language="javascript" type="text/javascript">
    function timeControl() {
         setTimeout('userCheck()', 60000);
    }
    function userCheck() {

        var id = setTimeout('pageReload()', 60000);
        var answer = confirm(" Warning your eMyHome session will expire in 60 seconds. Do you wish to continue?")

        if (answer) {
            clearTimeout(id);
            timeControl();
        }
        else {
            window.location.href = "eMyHomeMain.aspx";
        }
    }
    function pageReload() {
        window.location.reload(true);
    }
    timeControl();
  </script>
1
Contributor
2
Replies
13
Views
3 Years
Discussion Span
Last Post by swathys
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.