timer and jsp

Posted on 2003-02-23
Medium Priority
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.

Question by:illinosis
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

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.

(chomp, chomp)

Author Comment

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

Thanx once again.


Accepted Solution

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/">

Author Comment

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...


Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

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…
I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

770 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