Welcome Guest Search | Active Topics | Sign In | Register

TabStrip: How to open another tab Options
Boranet
Posted: Wednesday, July 25, 2007 4:23:37 PM
Rank: Advanced Member
Groups: Member

Joined: 7/25/2007
Posts: 34
I have just downloades de EO web COntrols, and i'm testing it before a buy it.

I'm using the EO TabStrip Control with 4 Tabs (Tab Items). Now i have in a certain PageView a button that i want to open a different tab. How can i do it?

Thanks
Boranet
eo_support
Posted: Wednesday, July 25, 2007 4:44:47 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi Boranet,

Thanks for posting your question here. You can do that via our client side Javascript interface:

1. Put the following JavaScript code in your page:

Code: JavaScript
function SwitchTab(index)
{
    var tabStrip = eo_GetObject("TabStrip1");
    tabStrip.setSelectedIndex(index);
}


Note you may need to replace "TabStrip1" with the ClientID of your TabStrip control.

2. You can then call it from any DHTML element. For example from a link:

Code: HTML/ASPX
<a href="javascript:SwitchTab(1);">Switch to the second tab</a>


This way you will be able to switch to any tab with a button.

Please feel free to let us know if you have any other questions.

Thanks
Boranet
Posted: Thursday, July 26, 2007 3:23:54 AM
Rank: Advanced Member
Groups: Member

Joined: 7/25/2007
Posts: 34
Hello Admin

Thanks for the answer. It helped me a lot. I found also that i could use the server side code "tabstrip1.SelectedIndex= n" thanks
eo_support
Posted: Thursday, July 26, 2007 6:29:23 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Yes. That will also work!


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.