Support Forum Softcomplex logo
About Us  | Services  | Download  | Order  | Support  | |
| Search | Today's Posts | Stats | Board Rules | Not logged in [ Login | Register ]
go to bottom
Last active: Never

Printable Version | Subscribe | Add to Favourites   Post new thread
Author: Subject: Error calling the calendar:parameter specified is not valid target control
JB
Newbie

Posts: 1
Registered: 10/16/2003
Member Is Offline
posted on 10/16/2003 at 11:23 PM Reply With Quote
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
View User's Profile View All Posts By User U2U Member
tigra
Administrator

Posts: 2049
Registered: 6/17/2002
Location: US, CO
Member Is Offline
posted on 10/17/2003 at 05:35 PM Reply With Quote

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.
View User's Profile View All Posts By User U2U Member
Post new thread

Related Links:
Product Page
Product Demonstrations Live Demos
Free Download Free Download
Product Documentation Documentation
Support Forum Support Forum
 

Go To Top


Powered by XMB 1.9.1 Nexus
Developed By Aventure Media & The XMB Group © 2002-2004