hockeylvr
Junior Member
Posts: 2
Registered: 3/13/2008
Member Is Offline
|
| posted on 3/13/2008 at 05:40 PM |
|
|
cal1 is Null or not an object
Update-I am now getting the javascript error: "cal1 is Null or not an object" - any ideas??
Great calendar! I cannot seem to get it to pop-up from my DetailsView in my .aspx page.
<head>
<script language="JavaScript" src="calendar2.js"></script>
</head>
<script language="JavaScript">
var cal1 = new calendar1(document.forms['DetailsView'].elements['TextBox12']);
cal1.year_scroll = true;
cal1.time_comp = false;
</script>
"DetailsView" is the ID name and is inside my "form1" and "Textbox12" is the ID of my text box in Edit mode. It doesn't like my control names
and I can't think of what else it wants. When I placed a text control directly in "form1" and added the calendar, it worked great. Would appreciate
any help. Thanks!
|
|
|
tigra
Administrator
Posts: 1976
Registered: 6/17/2002
Location: US, CO
Member Is Offline
|
| posted on 3/14/2008 at 02:59 PM |
|
|
you link calendar2.js (which defines calendar2) while attempting to initialize calendar1
instead, link calendar1.js or create calendar2 (depending on the format that you need).
|
|
|
hockeylvr
Junior Member
Posts: 2
Registered: 3/13/2008
Member Is Offline
|
| posted on 3/14/2008 at 04:59 PM |
|
|
Thanks, I've made that change but am still not getting the calendar to pop up. It does not like this:
var cal1 = new calendar1(document.forms['DetailsView'].elements['TextBox12']);
Error 'document.forms.DetailsView.elements' is null or not an object
I viewed the source file for my page and it is showing the ID for my text box as DetailsView_TextBox12. I tried that and it does not work either. I
found another post from someone working with asp.net pages, eliminating .elements with no luck either. I think it has something to do with calling my
DetailsView inside of my form1 but I can't seem to find out how to do it.
Thanks,
Toni
|
|
|