I am running into a problem with using the DHTMLgoodies calendar. I have an image with an OnClick event for the calendar pop up, within a form with a Submit button.
Yet everytime I click on the calendar image my form gets submitted.
Here is my code:
<form action="<%=MM_editAction%>" method="POST" name="ins_Update" id="ins_Update">
<table width="640" border="0" cellpadding="0" cellspacing="0" class="txt">
<tr height="10">
<td width="10"></td>
<td></td>
</tr>
<tr height="1">
<td></td>
<td class="top_wall"><img src="../Images/Layout/transparent.gif"></td>
</tr>
<tr height="10">
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td class="form-hdr">Add an event</td>
</tr>
<tr height="20">
<td colspan="2"></td>
</tr>
<tr>
<td></td>
<td>
<dl>
<dt>
<dt><label id="Whenlabel" for="theDate" style="visibility:hidden;">When (DD/MM/YYYY)</label></dt>
<dd><INPUT name="theDate" type="text" class="TextField" id="theDate" tabindex="4" size="50" maxlength="50" style="visibility:hidden;" value="<%=Day(Date) & "/" & Month(Date) & "/" & Year(Date) %>"><img src="..\Layout\cal.gif" value="Cal" onclick="displayCalendar(document.forms[0].theDate,'dd/mm/yyyy',this);"></dd>
</dl>
</td>
</tr>
<tr height="20">
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>
<input name="Submit" type="submit" class="Buttons" value="Add">
</td>
</tr>
</table>
</form>
I would really appreciate if you could tell me how to solve this problem.
Many thanks!