I'm working on a .Net/C# web application and had been using a javascript based calendar to allow users to select dates. This has been working fine.
Today I changed the code to include a master page and the datepicker which is called from a childpage has stopped working, the problem being that the Textbox which the date is returned to is no longer valid, due to the fact the form declaration now sits on the master page.
The code is
href="javascript:;" onclick="calendarPicker('form1.TBApplyDate');" title="Select Date from Calendar">Select
"Error Line: 1 Error: 'window.opener.document.form1.TBApplyDate' is null or not an object"
I've seen plenty of examples online of collecting the textbox client ID and passing that in the various permutations below, but I always get the same error.
href="javascript:;" onclick="calendarPicker('ctl00_MainContent_TBApplyDate');" title="Select Date from Calendar">Select
href="javascript:;" onclick="calendarPicker(form1.<%=TBApplyDate.ClientID%>');" title="Select Date from Calendar">Select
Can anyone provide any help on how I can reference the textbox succesfully?
Thanks in advance.