Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7536663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:38:14+00:00 2026-05-30T06:38:14+00:00

I am trying to create a Auto Logout page for my application. I am

  • 0

I am trying to create a Auto Logout page for my application. I am using Javascript to handle the timer with classic asp. I have three pages the js script page, the home page where I call the js file and start the timer using OnLoad(). After 4 seconds a window pops up to ask the user to continue there session. But when the window pops up and I click yes on the logout_alert.asp page it doesn’t update the timer on the home page. How can I get the popup window to update the timer? The following are the scripts.

Thanks for your help in advance,

Frank G.

I have three pages. For this example Page 1, Page 2, and Page 3.

PAGE 1 = logout_timeout.js


Here is the script for this page.

<!-- Begin

var c=0;
var t;

function ClockCount(){

c=c+1;
    //Show the clock value on the home page text field.
    document.timerform.clock.value = c;

if (c == 7) {
    //The user never responded so we will kill the session and log them out.
    alert("Your session has timed out you are logged out.");
    window.location.href = "logout.asp"
}
else if (c == 4) { 

    //We will popup a window to let the user know there about to be logged out.
    //This will give the user a chance to keep the session alive.
    logoutalert = window.open("logout_alert.asp", "logoutalert",    "toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=420,height=145,left = 465,top = 250");
}

 //The timer will go round and round while recalling this function.
 t = setTimeout("ClockCount()",1000);

 }

 //Call to start the timer.
 function StartClock() {
 ClockCount();
 }

 //Called to stop the timer.
 function StopClock() {
 c=0 //Clear the timer.
 clearTimeout(t); //Stop it.
 }

 //  End -->

PAGE 2 = homepage.asp


This page I call the logout_timeout.js file to.

 <script src="logout_timeout.js" type="text/javascript"></script>
 <body OnLoad="StartClock()">
 This will show our clock while its processing.
 <form id="timerform" name="timerform" method="post" action="">
   <input type="text" name="clock" id="clock" />
 </form>
 Used now just for testing!
   <input type="submit" name="continue" id="continue" value="START" onClick="StartClock()" />
   <input type="submit" name="continue" id="continue" value="STOP" onClick="StopClock()" />

PAGE 3 = logout_alert.asp


This page pops up to notify the user that they are about to be logged out.

 <script src="logout_timeout.js" type="text/javascript"></script>
 <body>
 <table width="100%" border="0" cellspacing="0" cellpadding="0">
 <tr>
 <td class="Thread_Title">SESSION TIMEOUT  Alert!</td>
 </tr>
 <tr>
  <td width="85%" class="DataRows">Your session is about to timeout. Would you like to continue using WOTTS?</td>
 </tr>
 <tr>
  <td></td>
 </tr>
 <tr>
  <td></td>
 </tr>
 <tr>
  <td><form id="timerform" name="timerform" method="post" action="">
 <input type="text" name="clock" id="clock" />
 </form></td>
 </tr>
 <tr>
  <td>
   <input type="submit" name="continue" id="continue" value="START" onClick="StartClock()" />
 <input type="submit" name="continue" id="continue" value="STOP" onClick="StopClock()" />   </td>
  </tr>
  </table>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T06:38:15+00:00Added an answer on May 30, 2026 at 6:38 am

    You’re missing a piece of the puzzle: A reference to the other window. Certain security restrictions sandbox separate window objects unless they are spawned from an existing window. If you use JavaScript’s window.open () function, your new window will open with a handle to the parent that opened it. Then, in scripts, you can utilize that handle to manipulate objects and behavior and to execute functions in the parent window. This ties it all together.

    There are many examples here:

    Can I pass a JavaScript variable to another browser window?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create an auto generated post excerpt from the current page's post
I'm trying to create an auto-updating app using Winforms. I can't use click-once or
I'm trying to create an auto-complete box and have been having problems due to
I'm trying to create a login and logout page with django. The problem I
I trying to create a auto-complete search script (jQuery + PHP) but I have
I'm trying to create a good match query for an auto-complete search box using
I am trying to create an auto-refresh for a table using ajax/jquery, php/html, and
I am trying to create a simple ajax chat using JQuery and ASP.NET. My
I'm trying to create an auto-complete function for the ICSharpCode.TextEditor. But the fileTabs_KeyDown doesn't
I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.