Hi there,
Basically, what I’m trying to do is quite simple. As you’ll see in the screenshot below, I’m trying to have the calendar appear and disappear when someone clicks on the righthand icon of the text input.
function on_hyperlink_click()
{
//object.isVisible = !object.isVisible;
alert("");
if (calendrier.isVisible())
calendrier.hide();
else
calendrier.show();
alert(calendrier.isVisible());
}
......
<input type="text" id="dateDebutPeriodePlan" />
<div style="position:absolute; margin-left:-19px; margin-top:4px; display:inline">
<a href="javascript:on_hyperlink_click();"><img src="img/calendar.gif" border="0" /></a>
</div>
The problem here is that the act of clicking on the icon when the calendar is visible closes the calendar before the toggling function has a chance to run (confirmed by the empty ‘alerts’ placed at the start of the function). So naturally, the calendar, once visible, never disappears since it’s always hidden by the time I check. Is there something I can do to fix this?
Thanks in advance,
Osu