Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to control Auto refresh by checkbox

 
rajee Malar
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I need a help to control the Auto refresh by checkbox. In a page, there is one checkbox. If the the checkbox is checked refresh on that page should start and pages should be refreshed for every 5 minutes. If the checkbox is rechecked, auto refresh should be stopped. ie refreshing the page for every 5 minutes should be stopped.
Please help me on this one.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First off,
Welcome to the ranch. Java Ranch has one rule and that is to have your disply name to be two words and hopefully your real name or a real sounding name that is not a famous person! You can change your display name by clicking My Profile link above.
Eric
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now for the helpfullness

You need to change the 1000 to the equivilant to 5 minutes. The function counts in milliseconds.
Eric
 
rajee Malar
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
Here is my 2 problem. Auto refresh starts autometically. I want to start whenever the checkbox is checked.
Another problem how to stop it. I am unable to stop the auto refresh even if i uncheck the checkbox.
Please share your ideas.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here:
 
rajee Malar
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Eric. It works fine now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic