javascript calendar

ScriptCalendar.com

Javascript Calendar


Contact

ScriptCalendar.com
An incredible javascript calendar

Site Map

Contact Us

Privacy Policy

Resources

© 2010


An incredible javascript calendar that displays events in a monthly format

XML Information

Javascript XML functions are either not supported or poorly supported in most of the current browser. Safari browsers for example do not support xml at all in version 1.0. Therefore, it is our recommendation that you use the scEvent.js format and the Event Editor in order to support as many browsers as possible. However, if you can control what browsers access your website, you may choose to use the XML features of our software. The Microsoft Internet Explorer 6+ fully implements all of the XML features used by the Scriptcalendar and we recommend using XML data with only that browser. Firefox and Netscape now support XML data events, but not the XLST transform.

The Scriptcalendar software supports (1.) XML data for database driven events, and (2.) an XSL transformation that can be used to control the layout.


XML data events

In order to use XML data events, you must...

  1. set the xmlFile property to the relative path of the XML file you want the calendar to use.
  2. Remove the dcEvent calls file either by renaming the dcevent.js or removing the javascript include for dcevent.js in the scrptcal.htm file or your HTML file.
You may still use the scSpcevt.js to include holidays and recurring events. This file is function called by the calendar as it renders and cannot be converted to XML. However, if you are using XML as generated by your database, your database should handle all special events and you may not need the scSpcEvt.js file.

This is a small sample of the xml.

<events>
	<event>
		<month>12</month>
		<day>1</day>
		<year>2006<year/>
		<text>event on 12-1-2006</text>
		<popuplink/>
		<style/>
		<tooltip/>
		<script/>
	</event>
	<event>
		<month>12</month>
		<day>2</day>
		<year>2006<year/>
		<text>event on 12-2-2006</text>
		<popuplink/>
		<style>scEventRed</style>
		<tooltip/>
		<script/>
	</event>
</events>


XSL Transform

In order to use an XSL Transform to control the layout of the calendar, you must...

  1. set the xslFile property to the relative path of the XSLT file you want the calendar to use.
When this property is set, the Scriptcalendar generates the calendar as XML and then transforms it for display in the browser window. Please examine the "scrptcal.xsl" file in the "scComponents" folder for an example of a Scriptcalendar XSL Transform.

More documentation on this feature will be added shortly.