Line: 670 which is startdate.value = hiddenstart.value;
But I am getting an uncaught TypeError:
Cannot read property 'value' of null in the javascript console.
Problem is that this only happens in Chrome and no other browser.
Could someone take a look and let me know if there is anything I can change to get this sort out.
<script language="Javascript">
function calcEndDate(cal) {
var startdate = document.getElementById("<?php echo columnnames($value); ?>_0");
var hiddenstart = document.getElementById("hiddenstart");
startdate.value = hiddenstart.value;
var date = cal.date;
var time = date.getTime();
var hiddenend = document.getElementById("hiddenend");
var date2 = new Date(time);
hiddenend.value = date2.print("%d-%b-%Y 23:59");
var enddate = document.getElementById("<?php echo columnnames($value); ?>_1");
enddate.value = hiddenend.value;
return true;
}
function calcUpdateEndDate() {
var enddate = document.getElementById("<?php echo columnnames($value); ?>_1");
var hiddenend = document.getElementById("hiddenend");
enddate.value = hiddenend.value;
}
</script>
<table cellpadding="0" cellspacing="3" border="0">
<tr>
<td><input type="text" class="standardfield_date_srch" name="<?php echo columnnames($value); ?>_0" value="<?php echo $dateoutput0 ?>"></td>
<td><img src="/images/icons/calendar.png" id="<?php echo columnnames($value); ?>0" style="cursor: pointer;" title="Date selector"></td>
<td><input type="hidden" class="standardfield_date_srch" name="hiddenstart" value=" <?php echo date("d-M-Y",time()) ?> 00:00">
<script language="javascript">Calendar.setup({ inputField:"hiddenstart",button:"<?php echo columnnames($value); ?>0",align:"Ll00", ifFormat:"%d-%b-%Y %H:%M", showsTime: true, onUpdate : calcEndDate});</script>
</td>
</tr>
<tr>
<td><input type="text" class="standardfield_date_srch" name="<?php echo columnnames($value); ?>_1" value="<?php echo $dateoutput1 ?>"></td>
<td><img src="/images/icons/calendar.png" id="<?php echo columnnames($value); ?>1" style="cursor: pointer;" title="Date selector" >
<td><input readonly type="hidden" class="standardfield_date_srch" name="hiddenend">
<script language="javascript">Calendar.setup({ inputField:"hiddenend",button:"<?php echo columnnames($value); ?>1",align:"Ll00", ifFormat:"%d-%b-%Y %H:%M",showsTime:true, onUpdate : calcUpdateEndDate});</script>
</td>
</tr>
</table>
Give me some hint or direct me where i wrong.