Can't Load Date Control Error
-
Hey there: i have this calendar control i used to put a html text box and an image and on click event on image a pop up calendar appears. Now when i removed the image and i added it to html textbox onclick event it gives me an error stating Can not load Date Control. Please Could any one tell me why and if there is any solution??
-
Hey there: i have this calendar control i used to put a html text box and an image and on click event on image a pop up calendar appears. Now when i removed the image and i added it to html textbox onclick event it gives me an error stating Can not load Date Control. Please Could any one tell me why and if there is any solution??
There is no way one can help you without seeing what code it ran during the click of the picture or onclick of the textbox. Please let us know what calendar control you are using, and how this is rendered. :zzz:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
-
There is no way one can help you without seeing what code it ran during the click of the picture or onclick of the textbox. Please let us know what calendar control you are using, and how this is rendered. :zzz:
Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
<td>
<input type="text" id="txtStartDate" runat="server" style="width: 160px"
onkeypress="return DisableSpecialCharactersWithLength(this,event,false,false,false,0)"
onclick="javascript:popUpCalendar(this,'<%=txtStartDate.ClientID%>','mmm dd yyyy')" />
</td>
<td style="padding-top: 2px">
<img alt="" id="img2" style="cursor: pointer" border="0" src="../../Images/calendar.gif"
onclick="javascript:popUpCalendar(this,'<%=txtStartDate.ClientID%>','mmm dd yyyy')" />
</td>now the input in the first TD has the error becuase i added popcalendar on onclick event , but when i remove it and i use the image onclick event having the same code then it works fine, it is really confusing me guys, even if i changed onclick event on the text box to on focus, on blur ....
-
<td>
<input type="text" id="txtStartDate" runat="server" style="width: 160px"
onkeypress="return DisableSpecialCharactersWithLength(this,event,false,false,false,0)"
onclick="javascript:popUpCalendar(this,'<%=txtStartDate.ClientID%>','mmm dd yyyy')" />
</td>
<td style="padding-top: 2px">
<img alt="" id="img2" style="cursor: pointer" border="0" src="../../Images/calendar.gif"
onclick="javascript:popUpCalendar(this,'<%=txtStartDate.ClientID%>','mmm dd yyyy')" />
</td>now the input in the first TD has the error becuase i added popcalendar on onclick event , but when i remove it and i use the image onclick event having the same code then it works fine, it is really confusing me guys, even if i changed onclick event on the text box to on focus, on blur ....
I think as you are using Javascript calendar, in the code written over the function, it should be expecting an img to generate the click event. Check what is written inside the
popUpCalendar
function. Just adjust the code such that it would get the event from the textbox itself rather than the image. You can see from withinPopUpCalendar
, you passthis
. In case of img, this represents theimg
object but in case oftextbox
it is input. These objects are completely different when you work using javascript. So you need to modify your code to support this... ... ;) Hope you can do that. :thumbsup:Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
-
I think as you are using Javascript calendar, in the code written over the function, it should be expecting an img to generate the click event. Check what is written inside the
popUpCalendar
function. Just adjust the code such that it would get the event from the textbox itself rather than the image. You can see from withinPopUpCalendar
, you passthis
. In case of img, this represents theimg
object but in case oftextbox
it is input. These objects are completely different when you work using javascript. So you need to modify your code to support this... ... ;) Hope you can do that. :thumbsup:Abhishek Sur
My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB
**Don't forget to click "Good Answer" if you like to.
Thanks a lot it helped and it worked, the problem was that i was searching for client Id of a control that was not created the moment i changed to this.id it worked fine. what helped that you told me that the problem is inside the script and when i did read the script i found that the error appearing was that it did not find the control iw ill mark your above answer as the solution.