This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
    Bookmark Topic Watch Topic
  • New Topic

i want countdown timer in minutes using jsp

 
satya nath
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Sounds like validating a user on client side.. how about using JavaScript timer function on page load.
 
satya nath
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
 
    Bookmark Topic Watch Topic
  • New Topic