Samples of Countdown Timers

 

Style 1a

Style 2a

Style 2b

Style 1b

Style 3a

Style 3b

Digital

Countdown to a date & time with time zone setting

Below are samples and links to the JavaScript codes of a countdown timer in a variety of styles.  I first found a JavaScript code for a countdown timer at www.javascriptkit.com but it only counted down to a specified date, so I modified it to add the ability to countdown to a date and time, then modified it some more into the variety of styles that are sampled below.


This site provides instructions for inserting a countdown timer into your web page using either Apple's iWeb or other HTML editors.  For instructions if you are using iWeb'06 (version 1.0; part of iLife '06), click here; if you are using iWeb '08 (version 2.0; part of iLife '08) or iWeb ’09 (version 3.0; part of iLife ’09), click here.  To get instructions on how to insert the countdown timer code in another HTML editor, click here.


The code for the timer includes a time zone setting so that the countdown timer counts down to the date and time based on the time zone you select, not on the viewer’s time zone.  Without this setting, if I set the countdown target date to, for example, January 10 at 12:00pm, the timer would count down to that date and time at the time zone of the viewer.  In other words, I am in Cleveland, Ohio, USA (Eastern Time Zone) but if someone is in Sydney, Australia, then the countdown timer viewed from their computer in Sydney would countdown to Jan 10, 12:00pm Sydney time, not Cleveland time.  Now, with this new time zone setting it would count down to 12:00pm Cleveland time, regardles of where one is viewing it.  You are able to set the time zone that you want it to count down to in the script.

Style 1c

Style 1d

Google Chrome (Windows and Mac)

Internet Explorer 6 & greater (Windows)

FireFox 2.x & greater (Windows and Mac)

Safari 3.x & greater (Windows and Mac OS 10.4.9 and higher)

Note: the scripts for these timers have been tested and will show up and work appropriately on the browsers noted below.  These include Safari 3.x and greater on both a Mac running OS 10.4.9 and later, including Mac OS 10.5 (Leopard) through 10.8 (Mountain Lion), and a PC running Windows XP, Vista or Windows 7; FireFox 2.x and greater on Mac and Windows; Google Chrome on Mac and Windows; and Internet Explorer 6.0 and greater on Windows.

Feel free to e-mail me with any questions, comments, suggestions or to let me know of other browsers that either support or don't support the codes as shown.

Email Me

NOTE: if you are using iWeb '06 (version 1.x), see the instructions here.

 

Comments (177)

Page 17 of 18
Facebookdel.icio.usDiggGoogle+TwitterLinkedIn
Bob Kuhnhenn (Westlake, OH, USA) wrote...
Simply change

var dd=futurestring-todaystring;

to

var dd=todaystring-futurestring;

in the script.

May 24, 2010 @ 9:53 PM EDT
Bob Kuhnhenn (Westlake, OH, USA) wrote...
I don't think it's possible to insert the code into Facebook using Facebook Markup Language (FBML) as it appears to not fully support Javascript (http://wiki.developers.facebook.com/index.php/UsageNotes/Javascript). I might suggest to just install the code into your regular website using the instructions on this site.

May 22, 2010 @ 9:37 PM EDT
AJ (Miami, FL, USA) wrote...
How do I change the code so that it does not show the number of days left. I only want it to show the number of hours, minutes and seconds. Could you please email me how to do this.

Thanks,

AJ

Admin:  I sent an e-mail to you showing the changes.

May 9, 2010 @ 6:12 PM EDT
Tracie (Charlotte NC, USA) wrote...
The countdown (Style 1A) appears on my page, but it doesn't function. It shows the titles (days, hours, etc.), but no digits and no countdown. Any idea where the problem might be?

April 21, 2010 @ 3:47 PM EDT
Bob Kuhnhenn (Westlake, OH, USA) wrote...
You forgot to include the onload event:

onload="countdown(year,month,day,hour,minute)"

April 21, 2010 @ 8:21 PM EDT
Benny (Postville, IA, USA) wrote...
Is there any way to add a photo image as a background so timer style 1A is overlayed onto a jpeg or gif? Any help would be greatly appreciated. Keep up the great work!

Admin:  Yes, just position the timer over the JPEG or GIF as the timer's background is set to transparent. Alternatively, set the background of the table to the JPEG or GIF using CSS.

April 18, 2010 @ 1:07 AM EDT
Derek (Lincoln, NE, USA) wrote...
Is there any way to make this repeat itself and count down to every wednesday?

February 11, 2010 @ 9:49 PM EST
Bob Kuhnhenn (Westlake, OH, USA) wrote...
Unfortunately, I don't know javascript well enough to make the timer do what you're requesting.

February 12, 2010 @ 8:38 PM EST
Derek (Lincoln, NE, USA) wrote...
thanks for the reply! what a great website! if anything ever comes up let me know!

also, is there a way to change the time zone so that it is back to the time zone of the viewer? so that it is different depending on where you are?

February 13, 2010 @ 2:35 PM EST
Page 17 of 18

Add Comment