Question:
How can i refresh a countdown on a website?
Olivier
2012-04-23 23:59:55 UTC
I am trying to make a countdown on a website but i can't get it to refresh itself. Does Anyone know how to make the countdown refresh itself every seconds?
The java script i have use to make the countdown is this :



I am new to programming so a detailed answer would help.
Four answers:
anonymous
2012-04-24 00:34:49 UTC
Hi, This script is great but I was wondering how I would go about getting it to display the minutes and seconds? So, instead of saying 110 seconds it would say 1 minute 50 seconds. I tried playing with it myself but ended up breaking the script.. many times Any help would be really appreciated!

Reply With Quote
brisray
2012-04-24 06:26:07 UTC
What you need do is start a timer in JavaScript then call your countdown code from that, which in turn starts the timer again. I use innerHTML to change the content of a tag, but you could use a textbox or whatever.



This goes into your HEAD section of the page







This goes in the BODY part









You can see a working example at http://brisray.com/test/countdown.htm
aNother
2012-04-24 00:58:21 UTC
Why not just grab the code from one of the websites that offers a "make your own" countdown script?



Here's one example of a site like this:



http://countdown.onlineclock.net/generator/
anonymous
2016-12-03 05:58:50 UTC
its no longer fresh its redirecting the consumer to google needs they're direct to google they're now no longer on your internet site consequently your code has no bring about case you desire to make it save showing google yet refresh each 5 seconds attempt applying an iframe. otherswise your code is sweet in case you you adjust google on your internet site.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...