Welcome Guest Search | Active Topics | Sign In | Register

Tab Strip Options
Sid
Posted: Friday, September 28, 2007 10:47:32 PM
Rank: Newbie
Groups: Member

Joined: 9/28/2007
Posts: 2
Hi,

Have a unique issue here. I have a Frameset - Don't know why I am using it but its there; the frameset has 2 frames - top and bottom. In the top frame i have the tab strip control; I need to set a tab based on some logic on the bottom frame. Unfortunately i have not yet succeeded in setting a selected tab. any ideas on how this can be implemted.

Regards,

Sid

eo_support
Posted: Saturday, September 29, 2007 7:46:57 AM
Rank: Administration
Groups: Administration

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

If the whole bottom frame is the tab area then it would be very easy. Just put each tab contents into a separate page and then set the tab's NavigateUrl and TargetWindow property. Otherwise you will need to use our client side JavaScript interface. Basically you put a ClientSideOnItemClick event handler for the TabStrip, that handler is called when you switch tab, inside that handler you can then call a function inside your bottom frame to switch the tab contents. If you use our MultiPage control, you can use the MultiPage client side API to switch the page. The final code will be something like this:

code in the top frame:

Code: JavaScript
function on_tabstrip_item_click(e, info)
{
    var index = info.getItem().getIndex();
    
    parent.name_of_your_bottom_frame.switch_page(index);
}


code in the bottom frame:

Code: JavaScript
function switch_page(index)
{
   var mp = eo_GetObject("id_of_your_multipage");
   mp.selectPageByIndex(index);
}


Thanks
Sid
Posted: Saturday, September 29, 2007 9:26:11 AM
Rank: Newbie
Groups: Member

Joined: 9/28/2007
Posts: 2
Hi,

I think I should rephrase my question. I have a frameset with 2 frames - top and bottom. The top and bottom frame calls an aspx pages respectively. The aspx page called by the top frame contanins the TabStrip object. I need to change the tabStrip selected index from the aspx page located in the bottom frame. Shall i make a cross frame function call?
Should i call the following function:

function on_tabstrip_item_click(e, info)
{
var index = info.getItem().getIndex();

parent.name_of_your_bottom_frame.switch_page(index);
}

If so, what shalli pass as info....In addition I also need to pass in the index of tab item to be selected.. help wld be appreciated...thanks
eo_support
Posted: Saturday, September 29, 2007 9:36:53 AM
Rank: Administration
Groups: Administration

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

The original answer was for you to change contents page in the bottom frame from the top frame. So it's very obvious that you can not use it as is. I am very surprised that you want to change the TabStrip from the bottom page though, because usually the TabStrip is the driver --- in another word, when you use a TabStrip, user would try to click it, and when user clicks a tab, the contents page need to switch. I am not sure why you want to use it the other way around.

If you must do it that way, the idea is still the same. For that you would recommend you to do it as two steps. The first step try to put the TabStrip inside the bottom frame and try to switch the tab with JavaScript. That should give you an idea of how to use our client side JavaScript interface. Once you are familar with that, it would be easy for you to move the TabStrip into the top frame.

You want to check "Client Side API Reference" section in our help file for detailed information about our client side API. You can also find several samples in our demo project about how to use the client side API.

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.