aspose file tools*
The moose likes JSP and the fly likes i want countdown timer in minutes using jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply locked New topic
Author

i want countdown timer in minutes using jsp

satya nath
Greenhorn

Joined: Feb 27, 2007
Posts: 9
Hello i had one urgent requirement i want count down timer so that when it reaches an hour from we acessing the page it must thrown an alert your time is completed.And also we must able to store the time also
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

Sounds like validating a user on client side.. how about using JavaScript timer function on page load.


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
satya nath
Greenhorn

Joined: Feb 27, 2007
Posts: 9
yaa i thought in your way.But the problem is when user com,eout of that page say after 30 mins he must able to acess is remaning 30 mins on any day so what to do then
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

so it could be handle by database where you have to store the minutes(which user already used) and retrieve and set this value into javascirpt time function..

setting value code into javascript..


just come into my mind..
hope it helps..
satya nath
Greenhorn

Joined: Feb 27, 2007
Posts: 9
Hey saif the risk is how to get the value and store .They are three ways where we can close the page,are we can go to homepage,are we can logout.then what is your idea
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

Originally posted by satya nath:
Hey saif the risk is how to get the value and store.


Yeah you are right.. its not possible to get a value from JavaScript into jsp page.. I don't have much experience in Ajax but I though it could help you to handle this type of conditions..


They are three ways where we can close the page,are we can go to homepage,are we can logout.then what is your idea


calling the same storing method on logout and for close window, implement the unload event in body element. whenever the page is unload this method will call by this event.

hope i would be useful...
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

satya nath,
Please don't ask the same question in multiple threads.
Doing so creates confusion and wastes the time of the poeple trying to help you.

Please continue this discucssion in its original thread:
http://www.coderanch.com/t/291494/JSP/java/had-one-importaant-requirement


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: i want countdown timer in minutes using jsp
 
Similar Threads
what action listener interface is doing in this code ?
Timer
Time-based responses in a JFrame?
Need to restart timer with different time
EJB Timer Services Query