Annie's "How to Add Date Countdown Script" Page

This is a page that gives tips for HTML using Front Page Express which is the program
that Annie uses. It is available free with Internet Explorer 4.0 & 5.0

"How do I add the Matching Scroll Bar Colors?":

How do I add the "date countdown" you have on your
Annie's "How Long Until Valentine's Day?" Page page?

It is important to know that you should generally just put ONE script on a page. Some of your visitors won't be able to see and use your page if you have more then one script.

1) Copy the code below

2) Near the top of the page put the cursor (the flashing line).

3) Go to 'insert' then 'html markup'

4) Paste the code

<script Language="JavaScript" >

day = new Date()
hr = day.getHours()
if (hr < 12)
mystring = "
Good Morning"
if (hr >= 12)
mystring = "
Good Afternoon"
if (hr >= 17)
mystring = "
Good Evening"
document.write(mystring += "
Happy Valentine's Day <br> ~ God offers a different kind of Love.")


<!-- hide this script tag's contents from old browsers-->
today = new Date();
BigDay = new Date("
February 14, 2002")
msPerDay = 24 * 60 * 60 * 1000 ;
timeLeft = (BigDay.getTime() - today.getTime());
e_daysLeft = timeLeft / msPerDay;
daysLeft = Math.floor(e_daysLeft);
e_hrsLeft = (e_daysLeft - daysLeft)*24;
hrsLeft = Math.floor(e_hrsLeft);
e_minLeft = (e_hrsLeft - hrsLeft)*60;
minsLeft = Math.floor((e_hrsLeft - hrsLeft)*60);
secLeft = Math.floor((e_minLeft - minsLeft)*60);
document.write( "<b><font size=4 color=white>
Valentine's Day 2002 will be here in "+daysLeft+" days, "+hrsLeft+" hours, "+minsLeft+" Minutes and "+secLeft+" Seconds</b></font>" );
// -- done hiding from old browsers -->
<!-- E_min and secLEft -->

5) You will want to personalize the date and greeting for your page!! I have put the words and dates that you can and should change in PINK above to help you see it better.

Also if you want some words on one line and then a second line you would need to put in <br> which will "break" or "start" a new line.

That's all you need to do!

Before you add the code to your page make sure you do a test page!!

Links to Other Tips Pages on Adding Countdowns:
Dynamic Drive has these pages:
Dynamic countdown script II & Countup script


For Other Tips Pages by Annie:

Annie's "Tips for Front Page Express" Page


Click here to go to Annie's Home Page
Annie's Home Page

Annie's Featured Holiday Page
Have a "Happy Everything"!
Annie's Holiday Page

Annie's Featured Page

Annie's "Featured Page" Page

Email Annie

Copyright 2002 - 2006 Annie's Home Page. All Rights Reserved. I thank the Lord for
graphics artists without them these pages would not be the same. Please visit
Annie's List of Great Graphics Spots for a list of their links. Some Graphics
on this page from
Graphics by Irene & Graphic Garden.
This site hosted by:
Christian Web Host.

For a Listing of the Rest of my Pages:
Annie's Directions to My House - Banner - My Index Page