I have a javascript datetimepicker that works well with everything except IE7 or above. The issue seems to be with getElementById. Here is how current code looks:
<tr>
<td style="width: 143px">Call Date:
</td>
<td style="width: 472px">
<input type="Text" name=cdate size=40 style="color: black;background-color:#FFFF66; width: 270px;">
<a href="javascript:NewCal('cdate','ddmmyyyy')"><img src="cal.gif" width="16" height="16" border="0" alt="Pick a date"></a>
</td>
</tr>
In IE7 or above this will not work. I get “Javascript error object missing”. If I change name=cdate to id=cdate it works but but when I submit the form to my php insert:
<?
$cdate=$_POST['cdate'];
The submission fails. So how can I correct this or how can I make the id= element be by name= element ….hope this makes sense.
Thanks
You can use both
nameandidso server will get the name and you can useidon the client sideSo you can use on the server side
and on the ckient side you can use