12 9 Embed a Calendar Control

LANSA Web Functions

12.9 Embed a Calendar Control

LANSA for the Web provides you with a calendar control that can be embedded into your application.

This calendar control can enhance the presentation of your application if it requires a calendar. If you need this calendar control, you will need to modify the STDHEADER page, either the default or a process specific page.

You will want to include an extra image into the toolbar. When the image is selected, it shows the calendar control. When you select a date from the calendar control, it populates the field with the selected date.

You will need to include the following line into your STDHEADER page:

 

<a href="javascript:CallCalendar()"><img src="/IMAGES/TB_CAL.GIF" alt="Calendar" border="0" width="70" height="21" hspace="0" vspace="0" align="left" /></a>

The calendar shipped with LANSA for the Web is configured to return the date in a DD/MM/YY format.

In order to the use this JavaScript function (CallCalendar( )), you must remove the conditional RDML tags (ONCONDITION) from the calendar JavaScript in the DEFAULT_SCRIPT.