|
Rank: Newbie Groups: Member
Joined: 8/12/2010 Posts: 4
|
Hi,
I've been having problems accessing the calendar object when its in an ASP UpdatePanel from client side js. Each time I use the getElementById it seems to pull back a table object with the same name instead of the calendar object.
Any help would be much appreciated
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, This is normal. Our DatePicker is not a single HTML element, so you can not use getElementById to get our Calendar control. You will need to use our client side API to do that. Please see here for more details: http://doc.essentialobjects.com/library/1/clientapi_howto.aspxThanks!
|
|
Rank: Newbie Groups: Member
Joined: 8/12/2010 Posts: 4
|
Hi,
Yes this is something I've taken a look at and I used the following command eo_GetObject('Calendar1') to try and pull back the calendar object but whenever its in the updatePanel it doesn't see it. I've checked for user control ID changes in the debug code I can't see anything different. Is the DatePicker in someway not compatable with the updatePanel as when this isn't there I can reference the object fine?
Many Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, You should be able to use DatePicker and UpdatePanel together just fine. One thing you want to double check is eo_GetObject takes the control's ClientID, not the control's ID. They are usually the same but can be different when the control is inside another control (in this case the DatePicker control is in the UpdatePanel, so they can be different). To make sure you always have the correct ID, use:
Code: JavaScript
eo_GetObject("<%=Calendar1.ClientID%>");
If you continue to have problem, please create a test page that demonstrates the problem. We will be happy to take a look once we have that. Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 8/12/2010 Posts: 4
|
Legend!! Sorted now.
Cheers
|
|