|
[ How the Calendar Works ] [ Calendar Examples ] [ Calendar Files ]
This page illustrates how to use multiple external event list files with the JavaScript
Event Calendar.
Hint: Before reading the comments below, go back to December 1998 on
the calendar!
The first required JavaScript statement can go anywhere in the HTML page, as long as
it is before the place where you want the calendar to appear.
| <script src="calendar.js"></script> |
This statement instructs the client browser to download the CALENDAR.JS file.
That file contains all of the "code" for the JavaScript Event Calendar.
You can use MULTIPLE external .JS files to store your events, as calls to the
DefineEvent( ) function. The following two files
(actual data files that I used the first year that I had the calendar in
operation!) are used in this example:
| HEVENTS.JS |
DefineEvent(19980211, "Tu B'Shvat", "", "",
0, 0);
DefineEvent(19980312, "Purim", "", "", 0, 0);
DefineEvent(19980410, "Erev Pesach", "", "", 0, 0);
DefineEvent(19980411, "Pesach I", "", "", 0, 0);
DefineEvent(19980412, "Pesach II", "", "", 0, 0);
DefineEvent(19980423, "Yom HaShoah", "", "", 0, 0);
DefineEvent(19980531, "Shavuot I", "", "", 0, 0);
DefineEvent(19980601, "Shavuot II", "", "", 0, 0);
DefineEvent(19980802, "Tish'a B'Av", "", "", 0, 0);
DefineEvent(19980921, "Rosh Hashana 5759", "", "", 0, 0);
DefineEvent(19980922, "Rosh Hashana II", "", "", 0, 0);
DefineEvent(19980930, "Yom Kippur", "", "", 0, 0);
DefineEvent(19981005, "Sukkot I", "", "", 0, 0);
DefineEvent(19981006, "Sukkot II", "", "", 0, 0);
DefineEvent(19981012, "Shmini Atzeret", "", "", 0, 0);
DefineEvent(19981013, "Simchat Torah", "", "", 0, 0);
DefineEvent(19981213, "Chanukah: 1 Candle", "",
"images/menorah.gif", 52, 52);
DefineEvent(19981214, "Chanukah: 2 Candles", "",
"images/menorah.gif", 52, 52);
DefineEvent(19981215, "Chanukah: 3 Candles", "",
"images/menorah.gif", 52, 52);
DefineEvent(19981216, "Chanukah: 4 Candles", "",
"images/menorah.gif", 52, 52);
DefineEvent(19981217, "Chanukah: 5 Candles", "",
"images/menorah.gif", 52, 52);
DefineEvent(19981218, "Chanukah: 6 Candles", "",
"images/menorah.gif", 52, 52);
DefineEvent(19981219, "Chanukah: 7 Candles", "",
"images/menorah.gif", 52, 52);
DefineEvent(19981220, "Chanukah: 8 Candles", "",
"images/menorah.gif", 52, 52);
DefineEvent(19981221, "Chanukah: 8th Day", "", "", 0, 0); |
| EVENTS.JS |
DefineEvent(19981101, "Religious School<BR>Parents'
Night<BR>and Book Fair", "", "", 0, 0);
DefineEvent(19981103, "Book Fair", "", "", 0, 0);
DefineEvent(19981107, "Jr. Cong.", "services.htm", "", 0,
0);
DefineEvent(19981108, "Book Fair", "", "", 0, 0);
DefineEvent(19981113, "Religious School<BR>Gimel/Dalet<BR>Kabbalat
Shabbat<BR>and Dinner", "", "", 0, 0);
DefineEvent(19981114, "Tot Shabbat", "services.htm", "", 0,
0);
DefineEvent(19981117, "Kosher Food Co-Op<BR>Order Date", "",
"", 0, 0);
DefineEvent(19981118, "Sisterhood<BR>Aerobics Night", "",
"", 0, 0);
DefineEvent(19981121, "Family Service", "services.htm", "",
0, 0);
DefineEvent(19981122, "Brotherhood breakfast", "", "", 0,
0);
DefineEvent(19981128, "Breakfast<BR>or brunch with<BR>college kids",
"", "", 0, 0);
DefineEvent(19981213, "<strong>First Light Celebration<BR>4:00 PM - 6:00
PM</strong>", "", "", 0, 0);
// Scheduled adult ed classes (link to adulted page)
DefineEvent(19981105, "Basic Hebrew Reading Class", "adulted.htm",
"", 0, 0);
DefineEvent(19981112, "Basic Hebrew Reading Class", "adulted.htm",
"", 0, 0);
DefineEvent(19981119, "Basic Hebrew Reading Class", "adulted.htm",
"", 0, 0);
DefineEvent(19981115, "Kashrut in the 90s Class", "adulted.htm",
"", 0, 0);
DefineEvent(19981122, "Kashrut in the 90s Class", "adulted.htm",
"", 0, 0);
DefineEvent(19981102, "Introduction to Talmud Class", "adulted.htm",
"", 0, 0);
DefineEvent(19981109, "Introduction to Talmud Class", "adulted.htm",
"", 0, 0);
DefineEvent(19981121, "Spirituality at Sunset Class", "adulted.htm",
"", 0, 0);
DefineEvent(19981219, "Spirituality at Sunset Class", "adulted.htm",
"", 0, 0);
DefineEvent(19981204, "Ask the Rabbi<BR>(6:15 Services)",
"adulted.htm", "", 0, 0); |
Include the following statements in the HTML page, anywhere after the line
that includes "calendar.js" and before the place where
you want the calendar to appear.
<script src="hevents.js"></script>
<script src="events.js"></script> |
Finally, place this piece of JavaScript at the exact spot in
the page where you want the calendar to show.
<script language="JavaScript">
<!--
SpecialDay=7;
Calendar( );
// -->
</script> |
(Notice that in this example, one of the default settings is overridden: the "special
day" for highlighting is changed to Saturday.)
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.
[ Back ] |