JB
Newbie
Posts: 1
Registered: 10/16/2003
Member Is Offline
|
| posted on 10/16/2003 at 11:23 PM |
|
|
Error calling the calendar:parameter specified is not valid target control
My StartDate is part of <Div id="Main">
<td width="100" height="21" class="AVcells"><input name="StartDate" width="100"
value="" onFocus="EndDate.value = StartDate.value" onChange="chkDate(this)" disabled="true"
style="background='#D3D3D3'" ></td>
<td width="16" height="21" align="left"><a href="javascript:cal1.popup();"><img
src="img/cal.gif" alt="Click Here to Pick the date" name="Cal1" width="16" height="16"
border="0" id="Cal1"></a></td>
and I've tried 2 ways to call the calendar.
var cal1 = new calendar2(document.forms['myForm'].elements['StartDate']);
cal1.year_scroll = false;
cal1.time_comp = false;
var cal1 = new calendar2(document.getElementById('StartDate').name);
cal1.year_scroll = false;
cal1.time_comp = false;
I've stepped through the debugger and the only time I get 'StartDate' passed to the function is with the getElementById. But then the
Value is Null and I receive the error.
I hope you can tell me what I'm doing wrong. Thank you in advance. JB
|
|
|
tigra
Administrator
Posts: 1990
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 10/17/2003 at 05:35 PM |
|
|
Try using working demo configuration from Tigra Calendar distribution package and then add your additional code piece by piece checking if script
still works fine. This is how you can find the part that causes the problem.
|
|
|