Welcome Guest Search | Active Topics | Sign In | Register

Disabling / enabling individual tabs client-side Options
Mark Rae
Posted: Wednesday, February 4, 2009 11:23:36 AM
Rank: Advanced Member
Groups: Member

Joined: 11/13/2008
Posts: 43
I have a tab control with three tabs on it, and I want to disable / enable the various tabs using client-side JavaScript.

I've found the setDisabled() and setEnabled() methods in the help file, but can't get them to work, as they don't appear to use exactly the same syntax as the setSelectedIndex() method. I've tried to disable the second tab using various permutations e.g.

Code: JavaScript
var tabStrip = eo_GetObject('<%=MyTab.ClientID%>');
tabStrip.setDisabled(1); // doesn't work
tabStrip.getItemsByIndex(1).setDisabled(true); // doesn't work


I looked in the sample code, but there were no examples of this in the TabStrip and MultiPage section...
eo_support
Posted: Wednesday, February 4, 2009 12:15:53 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,090
Hi,

You might be confused with different client side objects. getItemsByIndex is a method on the NavigationItemGroup object:

http://doc.essentialobjects.com/library/1/jsdoc.public.navigationitemgroup.aspx

Where as eo_GetObject returns you a Navigator object:

http://doc.essentialobjects.com/library/1/jsdoc.public.navigator.aspx

So in order to call getItemsbyIndex, you will need to get an NavigationItemGroup object first. The starting point for you would be this function:

http://doc.essentialobjects.com/library/1/jsdoc.public.navigator.gettopgroup.aspx

The reference section not only contains what's there and what's not there, but also which function is available on which object. In order to call any function, you must get the correct object first.

Hope this helps.

Thanks!


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.