Dynamic calendar - Miscellaneous tutorial
- Added: Nov 8th, 2005
- Level: Easy
- Author: Melfina
- Reads: 17,669
- Description: How to make your own dynamic javascript calendar for your site.
First, download this file, extract it and upload it to your host. It's a javascript file, taken from The JavaScript Source and slightly modified for this tutorial.
This script automatically creates the calendar for the month we are in, as stated on the visitor's computer and highlights the current day.
Take the image above, and with your image editor, add a picture, text or anything you want. Just don't change the lines and the image size! It should remain 110x185 pixels size. Save your calendar image as background.jpg.
Remember you don't have to put any date on the calendar, the JavaScript will do it for you. background.jpg must be saved on the same folder than calendar.js otherwise, it won't show.
With a good html knowledge, you can edit calendar.js to make a diferent template, but don't touch it if you don't know much html, or it may cause the script not to work!
Now to show your calendar on your page, simply add this piece of code where you want it to be:
<script src="calendar.js"></script>
Done! Now you have your own dynamic calendar. It will look something like this:
If you like this tutorial why not digg it or add to del.icio.us?
Tutorial © Melfina. Do not reproduce in any way without previous permission from the author.