Sample Calendar 3

Using category layers and alternate dates

(An explanation of how this sample calendar was implemented is given below the calendar.)


How this sample calendar was implemented

The first required JavaScript statements can go anywhere in the HTML page, as long as they are before the place where you want the calendar to appear.

<script src="layercalendar.js"></script>
<script src="layerevents.js"></script>
<script src="external_date_functions.js"></script>
<script src="sample_common.js"></script>

The second required piece of JavaScript goes at the exact spot in the page where you want the calendar to show.

<script language="JavaScript">
<!--
// override default settings and those from the sample_common.js file here
showAltDate = true;
showHolidays = true;
showAltHoly = true;
ExportPage = "sample_export3.html";
PrintPage = "sample_print3.html";

AddMsgBox(0,"Try hiding or unhiding entire categories of events using the checkboxes below.
Only unhidden event categories will be included in event exports.",3);
AddMsgBox(0,"Try hiding or unhiding entire categories of events using the checkboxes below.");
AddMsgBox(0,"Note: Alternate dates and holidays here are not events and will not be included in event exports.");

DefaultFormat = "layer";
DefineLayer("coffee","<font color="brown"><b>|</b></font>");
DefineLayer("school","<font color="red"><b>|</b></font>");
DefineLayer("youth","<font color="green"><b>|</b></font>");

Calendar( );
// -->
</script>

Here we have message box messages which apply in any month (date=0) superceding the setting for "DefaultMsgBox". Which gets displayed in any given month will depend on the number and size of adjacent cells in the message boxes. We have also pre-defined our categories and assigned a color to each so that all non-hyperlinked event descriptions will be displayed in their category color (unless overridden by embedded format tags).


Before attempting to implement the JavaScript Event Calendar on your own web page, it would be a good idea to study ALL of the examples.