It looks like your mail reader replaced my java script comments with file:// it should just be two forward slashes ( // no space between). That could be the problem, because I tested the code on IE 5.5 and it worked fine.
_____________________________________________ Pete Freitag ([EMAIL PROTECTED]) CFDEV.COM Web Developer Resources http://www.cfdev.com/ Check out ActivEdit a WYSIWYG HTML Editor that works like a Textarea http://www.cfdev.com/activedit/ -----Original Message----- From: A mailing list about Java Server Pages specification and reference [mailto:[EMAIL PROTECTED]]On Behalf Of Hari Yellina Sent: Tuesday, October 30, 2001 12:22 AM To: [EMAIL PROTECTED] Subject: Re: Inactive Time. Hi Freitag, Thank you very much for the code. I have tried it on Netscape 4.7 and as well on IE 5.5. Even I key in or move the mouse. At the click on 5 minutes I am be redirected to other page. Would you mind looking at the code . It would be very helpful for me. Regards, Hari Yellina. ----- Original Message ----- From: Pete Freitag <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 30, 2001 3:36 PM Subject: Re: Inactive Time. > Hari, You are correct. > > That fact makes the problem more tricky, a solution is below... It assumes > that doing something is either a mouse move or a key press, that should be a > reasonable assumption for this problem I think... > > <script> > file://5 min = 5 * 60 * 1000 ms > var msec = 300000; > file://store intervalID as a global variable > var intervalID = setInterval("timeOut()", msec); > > file://if a user does something give them 5 more min > document.onkeypress = resetInterval; > document.onmousemove = resetInterval; > > function timeOut() > { > document.location = "/lock.jsp"; > } > > function resetInterval() > { > file://cancel previous timer > clearInterval(intervalID); > file://make a new one > intervalID = setInterval("timeOut()", msec); > } > </script> > > _____________________________________________ > Pete Freitag ([EMAIL PROTECTED]) > CFDEV.COM > Web Developer Resources > http://www.cfdev.com/ > Check out ActivEdit a WYSIWYG HTML Editor that works like a Textarea > http://www.cfdev.com/activedit/ > > -----Original Message----- > From: A mailing list about Java Server Pages specification and reference > [mailto:[EMAIL PROTECTED]]On Behalf Of Hari Yellina > Sent: Monday, October 29, 2001 10:04 PM > To: [EMAIL PROTECTED] > Subject: Re: Inactive Time. > > > Dear Freitag, > > Thanks for you answer. It definelty works, If I am there for 5 minutes. > But a small problem. I want to redirect the page , if the user is inactive > for 5 min. But your answer would work, if the user is there and using the > application . every 5 minutes it is going to redirect. > > Thank you in advance. > > Regards, > Hari. > ----- Original Message ----- > From: Pete Freitag <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, October 30, 2001 1:41 PM > Subject: Re: Inactive Time. > > > > You can do this with java script, try something like this... > > > > <script language="JavaScript"> > > > > file://call the timeOut Function in 5 minutes > > setTimeout("timeOut()", (5*60*1000)); > > > > function timeOut() > > { > > file://redirect to a page that will expire the session on the > server > > document.location = "/expireSession.jsp"; > > } > > </script> > > > > _____________________________________________ > > Pete Freitag ([EMAIL PROTECTED]) > > CFDEV.COM > > Web Developer Resources > > http://www.cfdev.com/ > > Check out ActivEdit a WYSIWYG HTML Editor that works like a Textarea > > http://www.cfdev.com/activedit/ > > > > > > > > -----Original Message----- > > From: A mailing list about Java Server Pages specification and reference > > [mailto:[EMAIL PROTECTED]]On Behalf Of Hari Yellina > > Sent: Monday, October 29, 2001 9:16 PM > > To: [EMAIL PROTECTED] > > Subject: Inactive Time. > > > > > > Hi All, > > > > I am developing Point of Sale Application. I want user to lock the System > > in 5 minutes. It has to happen automatically, if the user is not using for > a > > 5 minutes. > > > > If any one had solved this problem. Please mail and a piece of code would > be > > of great Help > > > > Regards, > > Hari. > > > > > =========================================================================== > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > > Some relevant FAQs on JSP/Servlets can be found at: > > > > http://archives.java.sun.com/jsp-interest.html > > http://java.sun.com/products/jsp/faq.html > > http://www.esperanto.org.nz/jsp/jspfaq.jsp > > http://www.jguru.com/faq/index.jsp > > http://www.jspinsider.com > > > > =========================================================================== > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff > JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST > DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com > > =========================================================================== > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". > Some relevant FAQs on JSP/Servlets can be found at: > > http://archives.java.sun.com/jsp-interest.html > http://java.sun.com/products/jsp/faq.html > http://www.esperanto.org.nz/jsp/jspfaq.jsp > http://www.jguru.com/faq/index.jsp > http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com
