Forum OpenACS Q&A: Re: assign variables from javascript to openacs

Posted by Ryan Gallimore on
Hi Sasika,

You can attach the OpenACS showCalendar function to a button and ask it to populate a textbox.

I'll use the recommended ad_form Tcl procedure to build the form:

ad_form -name calendar -form {
{value " ... "}
{html {onClick "return showCalendar('start_date', 'ymd');"}}

For the showCalendar JS code, see /packages/acs-subsite/www/resources/core.js

For more info on ad_form, see this guide.