Welcome Guest Search | Active Topics | Sign In | Register

EO Calendar in update panel Options
Ash
Posted: Monday, August 16, 2010 4:53:27 AM
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
eo_support
Posted: Monday, August 16, 2010 9:07:12 AM
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.aspx

Thanks!
Ash
Posted: Monday, August 16, 2010 10:34:59 AM
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
eo_support
Posted: Monday, August 16, 2010 10:41:21 AM
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!
Ash
Posted: Tuesday, August 17, 2010 4:06:27 AM
Rank: Newbie
Groups: Member

Joined: 8/12/2010
Posts: 4
Legend!! Sorted now.

Cheers


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.