Friday, November 2, 2007

Link Javascript to Calendar Date

Greetings Yall......

Well, of course the head honcho at work desires a pop-up box when he clicks on a calendar date. This took a little figuering yesterday.....but I can say that I finally figured this one out after putting together a few different blog and forum postings.

First off, to link anything to a date in a calendar, insert the link into the calendar day link field on the Calendar Attributes page of the Region Definition section. What to insert in that section....well if you just want to link to another page in the application, it is pretty straight forward.....
1. Select "Page in this application"
2. Select the page number
3. Set the variables, if any, that you want to set from this page, into the next page.
4. Click Apply Settings.

However, should you have a handy javascript that you want to use, your link procedures will change. In this case do the following within the Day Link Field of the Calendar Attributes Page:
1. Select "URL" to link to
2. You will see all of the text fields go gray except the URL field at the bottom.
3. In this field, just type in the javascript call...for example.....javascript:callMyPopup()....without any other formatting or html.

As usual, be sure that the HTML Header section of the page contains your javascript code, included in the normal javascript formatting.

That should work to link the days in your calendar to a javascript.

Cheers and have a great weekend and holiday (if you are in Germany).

Jason

No comments: