Error :
Microsoft JScript runtime error: 'ctl00_ContentPlaceHolder1_txtAdmDate' is undefined
Code :
<input ID="txtAdmDate" runat="server" readonly="readonly" type="text"
tabindex="23" clientidmode="AutoID" />
<a href="#" onclick="showCalendarControl(ctl00_ContentPlaceHolder1_txtAdmDate)">
<img border="0" src="images/SmallCalendar.jpg"
style="width: 20px; height: 20px" /></a>
Javascript:
function showCalendarControl(textField) {
calendarControl.show(textField);
}
html rendered Source :
<input name="ctl00$ContentPlaceHolder1$txtAdmDate" type="text" id="ctl00_ContentPlaceHolder1_txtAdmDate" readonly="readonly" tabindex="23" />
<a href="#" onclick="showCalendarControl(ctl00_ContentPlaceHolder1_txtAdmDate)">
<img border="0" src="images/SmallCalendar.jpg"
style="width: 20px; height: 20px" /></a>
Problem :
Though the html rendered source shows that the id of control is ctl00_ContentPlaceHolder1_txtAdmDate and the same is passed to the javascript function error is generated.I have tried setting clientidmode to Autoid and static but nothing works. Need help from you guys to solve this issue.