I have the following snippet of code which shows a little calendar icon and a textbox on the form.
<td width="26" height="24" valign="top"><a href="javascript:show_calendar('form1.datebox');" onMouseOver="window.status='Select a date...';return true;" onMouseOut="window.status='';return true;"><img src="show-calendar.gif" width=24 height=24 border=0></a></td>
<td colspan="2" valign="top"><input name="datebox" type="text" size="10"></td>
Currently, if a user clicks the calendar icon, a calendar pops up and they select a date. The selected date is automatically inserted into the textbox.
In addition to that, I want to force the calendar to appear when the user clicks on the textbox as well. From the reading I've been doing, it seems I need to use either an onFocus event or onClick event but I can't seem to get it to work. Any help or suggestions would be great.
<td width="26" height="24" valign="top"><a href="javascript:show_calendar('form1.datebox');" onMouseOver="window.status='Select a date...';return true;" onMouseOut="window.status='';return true;"><img src="show-calendar.gif" width=24 height=24 border=0></a></td>
<td colspan="2" valign="top"><input name="datebox" type="text" size="10"></td>
Currently, if a user clicks the calendar icon, a calendar pops up and they select a date. The selected date is automatically inserted into the textbox.
In addition to that, I want to force the calendar to appear when the user clicks on the textbox as well. From the reading I've been doing, it seems I need to use either an onFocus event or onClick event but I can't seem to get it to work. Any help or suggestions would be great.