Xml Calendar

Ranked #1,728 in Computers & Electronics, #32,675 overall

Xml Calendar

Are you looking for an xml calendar? A calendar that you can add to your website to display events to your visitors?

The scriptcalendar is the answer. It is a javascript calendar that can load xml formatted events and display them on your page. Since it is a javascript only solution, it is guaranteed to work on your website. There is an example of the calendar to the left.

It can easily be added to your page with a single html tag...


<!-- scriptcalendar iframe tag -->
<iframe id="scIFrame" name="abc" src="scthemes/standard/scrptcal.htm" scrolling="no" frameborder="0" width="800" height="700" ></iframe>



Plus, the xml events are easy to write, and there is even an event editor to help you.

Problems with javascript - soved with XML

As you probably already know, javascript has the built in limitation that it cannot read or write from the server. This is done for security reasons. It has been part of javascript from day one.

This limitation makes it impossible for javascript to read from a database, or even a text file. There's no method for javascript to read from the server. So you cannot have a database in a pure javascript solution.

XML is the next best thing. It's a simply a text file containing well organized data. If so don't or can't have a database, XML text files are the next best thing. Most modern languages including javascript can parse an XML file. Plus, XML has the added benefit of being able to hold relational / hierarchical data.

But we still have the problem of javascript being unable to read the file. The solution here is Asynchronously load the XML through Ajax. Modern javascript libraries like JQuery allow you to load file and execute javascript code when it finishes. All you need to is load the XML data and parse it after it is loaded

Xml Calendar in Javascript




Leaves theme example



The scriptcalendar is an xml calendar written entire in javascript. It loads the xml events from the server in an Ajax like manner. An asynchronous call to the server is made to load the event data. When the load is complete the javascript parses the xml. The parsed events are then added to the calendar.

This entire process is the if the best approximation of a true database available in javascript. As described above, it uses the event data stored in the xml formatted text file. The asynchronous load "reads" the xml from the server. The XML is them parsed on completion of the async load and translated into events displayed on screen.

Xml Calendar Events from a Database




Snow theme example



You can generate your events data from a database and supply it to the calendar. Simply create an ASP.NET, PHP or JSP page that renders the xml. Then, supply this page as the xml event source to the scriptcalendar software. When the scriptcalendar is requested, it will aysnchronously load the xml from the dynamically rendered page and display the events screen.

By rendering event xml from a page instead of creating a file on the server, you avoid any concurrent user issues with file IO.

Xml Calendar - Xml Sample - Calendar Xml

Here is a sample of the xml used by the scriptcalendar. It is Calendar Xml

<events>

<event>
<month>7</month>
<day>23</day>
<year>2009</year>
<text>My Birthday</text>
<style>scEventRed</style>
</event>

<event>
<month>7</month>
<day>30</day>
<year>2009</year>
<text>End of the Month get together</text>
<style>scEventBlue</style>
</event>

</events>

Xml Calendar



thumb150.gif

See the Javascript Calendar in action
or download the code for your website.





javascript calendar

What do you think?

submit

by

adwords-marketing

I'm the author of the Scriptcalendar software. I've got hundreds of emails from people over the years thanking me for the software. If you need an event... more »

Feeling creative? Create a Lens!