Date on Page with
Changable Daily Text.




There are facts, jokes, quotes, idioms, hints, small poems, Tongue Twisters & National Holidays for Australia, US, GB and other things for every day of the year. Just change your date on your computer then refresh this page to see how the Script works.

This script allows you to change your Table: width, Border size & colour, BG colour & size, Font: Face and Size, Date: colour & insert a message for each or any day of the year with full HTML formatting.

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
/***********************************************
Daily Message and Date:EwokOfEndor@Hotmail.com
Copyright 2002
Gary Ivin
You can use and rewrite this code freely
as long as you leave this heading
************************************************/
// Insert the colour for your DATE
var dCol= "#ff0000";

//Insert the colour for your TEXT.
var txtCol= "#004080";

Insert the size for your Font
var fontSz= "5";

//Insert the Face for your Font
var fontFace= "Georgia, Times New Roman, Times";

//Insert the size for your TABLE WIDTH.
var tabWth= "560";

//Insert the size for your TABLE BORDER. 0 = none
var tabBordSize= "5";

//Insert the colour for your TABLE BORDER COLOUR.
var tabBordCol= "#800000";

//Insert the colour for your TABLE BACKGROUND COLOUR.
var tabBGcol= "#f4fff4";

Do not change any of these:
var Text=" ";
A new instance of the date object:
var thisDate = new Date();
To get the Month:
var thisMonth = (thisDate.getMonth() + 1);
To get the year:
var thisYear = (thisDate.getYear());
To get the day for the case statment:
var num= thisDate.getDate();

The IF statmant only works for the thisMonth == number so that the computer dose read the case statment inside it and therefore save time in loading.
if (thisMonth == 1){WordMonth = " January ";
This is a JavaScript case statment. The break; tag tells it to stop seaching after it finds the case it needs.
switch(num){//DO NOT CHANGE

/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
/ / / / / / / / / CHANGABLE / / / / / / / / / / / / / / / / / / /
/ / / / ONLY PUT IN THE MESSAGE YOU WANT / / / /
/ / / / BETWEEN THE QUOTES IN Text=" "; / / / / / /
/ / / / / / /CHANGE NOTHING ELSE / / / / / / / / / / /
/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
case 1:Text="Write Your Message Here"; break;
case 2:Text="
Write Your Message Here"; break;
Etc, Etc, Etc.
case 30:Text=" "; break;
case 31:Text="
Leave Blank As Above for No Message."; break;

Important: Do Not Put Double Quotation Marks or the Script will NOT WORK. Only use Single Quotation Marks or Ampersand Commands. Single Left &#8216; () Single Right &#8217; () Double Left &#8220; () Double Right &#8221; (). (As in the example below.) When inserting image or any other HTML code make sure that it is in Single Quotation Marks. Or you can put a Backslash \ before the Double Quotation Marks. This informs the computer that it is not part of the Script. (As in the 2nd example below.) To see more Ampersand Commands Click Here.

E.G. Message With Picture In It. (April 25th & March 30th)

case 25:Text=" <center><img src='YourPicureFolderAddress/Flag_Aussie_Wave.gif' alt='Flag_Aussie_Wave.gif' title='Australian Flag Waving.' width='153' height='86' ><br>Today is Anzac Day in Australia.<br>Lest We Forget.<br> <img src='PicFolder/Grave_Stone_Sm.gif' alt='Grave_Stone_Sm.gif' width='81' height='92' title='Lest We Forget'><center> "; break;

Sunday, 25th April, 2014.
AustralianFlagWaving01_Big.gif
Today is Anzac Day in Australia.
Lest We Forget.
TombstoneCrossBloomingFlowers.gif

case 30:Text=" <div align='center'><font size='5'>GOLF <font> <div>In Scotland, a new game was invented. It was entitled Gentlemen Only Ladies Forbidden... and thus the word GOLF entered into the English language.<center> <img src="Pic/SportStuff/GolfBallOnGreenWithWavingFlag_Sm.gif" alt="Golf Green."></center> "; break;

Tuesday, 30th March, 2010.

GOLF.

In Scotland mid 17th Century, a new game was invented. It was entitled Gentlemen Only Ladies Forbidden.... and thus the word GOLF entered into the English language.

GolfBallOnGreenWithWavingFlag_Big.gif

/ / / / / / / / / / / / / / / / / / / / / / / / / / / /
/ / / / / /END CHANGABLE/ / / / /
/ / / / / / / / / / / / / / / / / / / / / / / / / /
}// end Case
}// end If

This is repeated for each month of the year.

/ / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
/ / / / / / /UNCHANGABLE/ / / / / / / /
/ / / / / / / /FROM HERE/ / / / / / / / / /
/ / / / / / / / / / / / / / / / / / / / / / / / / / / /
document.write(“<table width='”+tabWth+“' border=”+tabBordSize+“ align='center' cellpadding='4' cellspacing='0' bordercolor=”+tabBordCol+“ bgcolor=”+tabBGcol+“><tr><td><font size='”+fontSz+' face='“+fontFace+”' color='” +txtCol+ “'> <b><font color='”+dCol+“'><center>”+thisDate.getDate()+ “ ” +WordMonth+“, ”+thisYear+“.</center></font><div align='justify'> ”+Text+“ </div></b></font></td></tr></table>”);
//End Script --> </script>

Select and Copy this JavaScript
into the <BODY> of your document
where you want the date to be

BlueBar.gif



Visitor N°   
          
Free Text Counter.        
Counter added 19/10/2014.
     

Top