JavaScript Countdown Timer: Need To Count Down and Then Redirect The User

Hey Everyone,

I'm sure this is already out there but it has been harder then I thought it would be to locate just what I am looking for.  I'm testing with my site and I've got a full screen window that has 2 frames...top.cfm and bottom.cfm in the frameset.cfm frame.  On the top frame, I need to count down from 1 hour and 30min to 0 where 0 is when the test time is up for the student and they are redirected to another webpage.

Who's got a nice and easy fuction that can be configured pretty easily...

Thanks a lot,
inverted_2000
LVL 2
inverted_2000Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

inverted_2000Author Commented:
Anyone today have a time left counter for me?
0
RoonaanCommented:
You can use

setInterval('mycountdownfunction()', 1000); //1000 ms = 1 second

Then have:

var numberofseconds = 60 * 90;
function mycountdownfunction() {
  numberofseconds--;
  if(numberofseconds <= 0) {
     do something
  }
}

However, you should also keep track of time serverside, as javascript could be bypassed by inventive users.

-r-
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.