views:

187

answers:

1

Ho do you reference code inside an AJAX tabcontainer? Is there an easy way? I am using a datepicker script and I am having trouble referencing the calendar inside an AJAX tabcontainer. This gives trouble cannot FIND it. Doesn't work

<img onclick="displayDatePicker('ctl00$ContentPlaceHolder2$TabContainer1$txtDateContacted');" 
                    src="images/cal.gif" />

All the other calendars outside the tabcontainer I can reference without any problem. I.e.

<img onclick="displayDatePicker('ctl00$ContentPlaceHolder2$txtDateContacted');" 
                    src="images/cal.gif" />
+1  A: 

After doing some research I found my question. You also need to reference the tab where you have the control. If you look to the source code that is render. You can grab the value that you are looking for. Hope this helps somebody else.

<img onclick="displayDatePicker('ctl00$ContentPlaceHolder2$TabContainer1$TabPanel1$txtDateContacted');" 
                    src="images/cal.gif" />
Tony