Message Based On Date


MESSAGE #11


This script displays a different message for each day. The only thing you need to change is the MONTH# in the top of the script. Yes, you will have to update this every month.

This first part goes in the <head></head> tag. 
<SCRIPT Language="JavaScript"> 
<!-- Hide from old browsers
// Copyright  1999 Doug Popeney
// Created by Doug Popeney (easyjava@easyjavascipt.com)
// JavaScript Made Easy!! - http://www.easyjavascript.com

  var now = new Date();
  var month = now.getMonth() + 1;
  var date = now.getDate();
  var year = now.getYear();

  if (month == "MONTH#"){
        msgs = new Array
        msgs[1] = "MESSAGE #1"
        msgs[2] = "MESSAGE #2"
        msgs[3] = "MESSAGE #3"
        msgs[4] = "MESSAGE #4"
        msgs[5] = "MESSAGE #5"
        msgs[6] = "MESSAGE #6"
        msgs[7] = "MESSAGE #7"
        msgs[8] = "MESSAGE #8"
        msgs[9] = "MESSAGE #9"
        msgs[10] = "MESSAGE #10"
        msgs[11] = "MESSAGE #11"
        msgs[12] = "MESSAGE #12"
        msgs[13] = "MESSAGE #13"
        msgs[14] = "MESSAGE #14"
        msgs[15] = "MESSAGE #15"
        msgs[16] = "MESSAGE #16"
        msgs[17] = "MESSAGE #17"
        msgs[18] = "MESSAGE #18"
        msgs[19] = "MESSAGE #19"
        msgs[20] = "MESSAGE #20"
        msgs[21] = "MESSAGE #21"
        msgs[22] = "MESSAGE #22"
        msgs[23] = "MESSAGE #23"
        msgs[24] = "MESSAGE #24"
        msgs[25] = "MESSAGE #25"
        msgs[26] = "MESSAGE #26"
        msgs[27] = "MESSAGE #27"
        msgs[28] = "MESSAGE #28"
        msgs[29] = "MESSAGE #29"
        msgs[30] = "MESSAGE #30"
        msgs[31] = "MESSAGE #31"
        var msg = msgs[date]
}
//-->

</SCRIPT>
The following lines go any where in your document. 
<SCRIPT>
document.write(msg);
<SCRIPT>
