Bookmark to del.icio.us
Description: Does your form contain INPUT box(es) that require a date value from the visitor? Sev's Popup Calendar script allows for a visual, interactive way of selecting and inputting this date, rendering the job of your visitor reaching for a physical calendar to find out the date (whether for today's or otherwise) obsolete. Very practical use of DHTML...
Step 1: Download the following zip file, and upload the containing "pupdate.js" file into your webpage directory:
popcalendar.zip (contains "pupdate.js" and "readme.html")
Step 2: Add the following code to the HEAD section of your webpage:
Step 3: Last but not least, apply the below to the END of your document, right above the </BODY> tag:
Configuring the script
Once set up per the instructions above, extending any form element to enable the Popup Calendar on it is simple. Simply include a link similar to the following alongside the form box:
<a href="#" onClick="getCalendarFor(document.test.test2);return false">[Choose one]</a>
where the part in red specifies where the generated date should be applied to, with "test" being the name of the form, and "test2", the name of the form element, as denoted by the name attribute inside each tag.