Forum OpenACS Q&A: Re: How to insert JavaScript or .js file into ADP

Collapse
Posted by Alfred Werner on
If you look at the page admin/entry-edit.tcl in the lars-blogger, you'll see an example of how to embed javascript validation in a form:: item.

Specifically:

element create entry entry_date -label "Entry date" -datatype text \
        -help_text "If you set this to something other than today's date, you must use this form to publish your entry, otherwise the entry date will be set to the date you publish the item." \
        -after_html {(<a href="javascript:setEntryDateToToday()">Set to today</a>)}