1. Home
  2. Computing & Technology
  3. JavaScript

Calendar Popups

1. The Calendar Script

clr gif
Join the Discussion

Questions? Comments?

More of this Feature

Which Calendar? In Page

So you have decided that it would be useful to provide an option on one of your pages that allows visitors to your site to display a calendar. Here is a script that can do that for you.

The first step in using this script is to select the code from the text box below (there is a highlight all button beneath it to make this easier) and copy it into a file called calendar.js.

You may wish to make changes to the colours used in the pop-up so these have been loaded into variables outside of the function but you shouldn't need to change anything else in the script.

You next attach the script into your web page that you want to be able to display a popup calendar from by adding the following code into the head section of your page.

<script type="text/javascript" src="calendar.js">
</script>

All that remains then is to call the popup calendar from within the page, you just have to tell it which calendar to display.

The Script | Which Calendar? | In Page

Note that the script and the descriptions of how it can be called are copied from the "Ask Felgall" website with the permission of the copyright owner.

Explore JavaScript
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.