Click to See Complete Forum and Search --> : Calendar
DanUK
03-23-2003, 12:12 PM
Hey does anyone know of a Javascript that produces a calendar where you could add tasks? It's for a website that carries out events in a community, and i thought it would be nice to have a calendar of the months with say, highlighted dates when there's an event planned and when that date was clicked it would bring up information about it?
If you have any suggestions please tell me - thanks! I've tried some but no good :\
Nedals
03-23-2003, 01:17 PM
That's a fairly complex task. Hopefully you have some javascript skills.
Here is how I would this. No! Here's how YOU could do this.:)
1. Make up 31 number images and a blank (all the same size)
2. Build a 7 x 5 cell table and put the blank image in every cell (you could also do this without the table. Up to you)
Each image will have a link to a javascript routine. 'getMessage(0)'.. 'getMessage(34)'
3. onLoad() populate the 'table' with the numbered images using a date function to get the first day of the week of the current month. That will act as an offset to tell you where 'imageNo1' will go. The number of images populated will depend on the number of days in that month. ( kept in another array )
4. Each images will have a border. The color can be changed to indicate special events.
5. Click on a colored border and a popup window can display a message (saved in an array in an external JS file)
Is that enough to get you started? :)
Nedals
03-23-2003, 10:49 PM
Here's a script to get you going. Save this as an HTML file and it should work. You will need the images.