Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

timer and jsp

Posted on 2003-02-23
4
Medium Priority
?
526 Views
Last Modified: 2010-05-18
hey all,

just wondering if ne one cud help me out wid a problem i am having.

what i wud like to do is redirect a user a an assesment page which starts a timer when it goes to this page. when the time is up ie 60mins the assesment page closes and goes back to the main page and the user is not allowed access to the assesment page and everything in the database is updated accordingly.

i no how to prevent the user from accessing this page again, but how can i start the timer as soon as the user is redirected and how wud i redirect back to the main page after 60 mins if the user has not finished the form?

any ideas/suggestions wud b v grateful!

Thanku v much in advance.

Ill.
0
Comment
Question by:illinosis
  • 2
4 Comments
 
LVL 5

Expert Comment

by:gator4life
ID: 8004156
illinosis -

Just put the following line of JavaScript into the <head> of the page with the form:

window.setTimeout('window.location.href = \'insert main page's URL here\';', 3600000);

It sets a timer on the page that will fire the action (the first argument) when the timer limit (the second argument - in milliseconds) is reached.

Hope this helps.

gator4life
(chomp, chomp)
0
 

Author Comment

by:illinosis
ID: 8004353
Hey Gator4life, will try out tmor, if it works (i hope it does) the points r urs!

Thanx once again.

Ill.
0
 
LVL 3

Accepted Solution

by:
NetWize earned 90 total points
ID: 8007700
gator4life is right, at least if the User doesn't disable JavaScript...

The same thing can be done with a <meta>-Tag in HTML

<meta http-equiv="refresh" content="3600;URL=http://the.main.page/">
0
 

Author Comment

by:illinosis
ID: 8074660
hey sorry i posted points v.late-have been v busy. thanx for all ure comments and helps, but NetWize was the method that i used. Thanku NetWize...

Ill.
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question