This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JSP and the fly likes Countdown Timer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Countdown Timer " Watch "Countdown Timer " New topic
Author

Countdown Timer

Saumyaraj Zala
Ranch Hand

Joined: Aug 06, 2012
Posts: 56

I want to have a count timer on my web page which will decrement with each second and when it becomes zero then my page would get submitted(online-test). I can do this my using javascript but is there any good alternative?
Thanks for your answer.


Why do we fall? So that we can learn to pick ourselves up.
J. Kevin Robbins
Ranch Hand

Joined: Dec 16, 2010
Posts: 632
    
    7

Nope. You are talking about an automatic request from the client and Javascript is the only thing that's going to do that for you.

You could probably do it with an applet*, but considering the security implications, applets have fallen out of favor and are not recommended for new development. Most companies, such as ours, have disabled Java in the browser, rendering applets obsolete.

*I've never written an applet and I'm not familiar with all their capabilities, so take that with a grain of salt.


"There is no reason for any individual to have a computer in his home" ~ Ken Olson, Co-founder of DEC, 1977
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Countdown Timer
 
Similar Threads
How to have the same timer on all pages?
Timers in javascript
Timer in mock exam
Timer service is still running even undeploy the application
how to create timer in jsp?