Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: alert box Q


Message #1 by "Phil Sayers" <philipsayers@m...> on Thu, 31 Jan 2002 12:17:56 -0500
This is a multi-part message in MIME format.

------=_NextPart_000_0001_01C1AA64.A7591810
Content-Type: text/plain;
	charset="US-ASCII"
Content-Transfer-Encoding: 7bit

That's what I'm doing..but when the first alert is on the screen does
the timer for the second alert keep running in the background, or does
it stop wait until the first alert goes away.
 
Also, is there a way to programmatically simulate a click on the "OK"
button of an alert box, so if the user does not reply, then I can
redirect the page elsewhere.
 
 
-----Original Message-----
From: George Smyth [mailto:george.smyth@U...] 
Sent: Thursday, January 31, 2002 2:09 PM
To: javascript
Subject: [javascript] RE: alert box Q
 
You may wish to use two window.setTimeout() methods - one to display the
alert (set at 1'55") and the other to close the window (set at 2').
 
Cheers -
 
George L Smyth, Webmaster
U.S. Naval Academy Alumni Association
 
-----Original Message-----
From: Phil Sayers [mailto:philipsayers@m...]
Sent: Thursday, January 31, 2002 12:18 PM
To: javascript
Subject: [javascript] alert box Q
 
Listers,
 
I haven't done much with javascript so please bear with me..
 
I'm trying to put a counter on some admin pages for a content management
system.  I'd like to automatically logout (by loading another page which
will do the logout) the user after 2 hours of inactivity.  (by
inactivity I mean has not left the current page for 2 hours).  But 5
minutes before the 2 hours I'd like to popup an alert box letting the
user know that's it's almost time up.
 
When I fire up an alert() for the 5 min before, will my 2 hour timer
keep running in the background?  
 
If the timer doesn't keep rolling, is it possible to close the alert()
box after 5 mins and then do the logout anyway since the user didn't
click the alert, so no-one is there and thus the user should be logged
out.
 
Thx
 
Phil
 
$subst('Email.Unsub'). 
$subst('Email.Unsub'). 



  Return to Index