This is a migrated thread and some comments may be shown as answers.

Change Tab / PageView on client-side

2 Answers 211 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Tomica
Top achievements
Rank 2
Tomica asked on 26 Mar 2014, 10:16 PM
I would like to have an event fired from a image map hotspot on a multi-page layout with associated tab strip.

Currently I have this working where I open a LightBox control via a script I picked up from that forum.

For one of the hot-spots I would rather have it change tabs, i.e. just as if the user clicked on another tab.

I've tried the following, but 99% of what I know is server-side, so assume I know NOTHING about how this works on the client.
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
 
<script type="text/javascript">
    function OpenAboutLightBox(index)
    {
        var lightBox = $find('<%= AboutLightBox.ClientID %>');
        lightBox.set_currentItemIndex(index);
        lightBox.show();
    }
    function switch_tab(index)
    {
        var tabstrip = $find('<%= RadTabStrip1.ClientID%>');
        tabstrip.index = index;
 
        var multipage = $find('<%= RadMultiPage1.ClientID%>');
        multipage.index = index
    }
</script>
 
</telerik:RadCodeBlock>

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 Mar 2014, 06:09 AM
Hi Tomica,

Please try the following JavaScript code snippet to change RadTab from client side.

JavaScript:
<script type="text/javascript">
    function switch_tab(index) {
        var radtabstrip = $find("<%=RadTabStrip1.ClientID %>");
        radtabstrip.set_selectedIndex(index);
    }
</script>

Let me know if you have any concern.
Thanks,
Shinu.
0
Tomica
Top achievements
Rank 2
answered on 27 Mar 2014, 06:33 PM
Yes, this works fine.
Tags
TabStrip
Asked by
Tomica
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Tomica
Top achievements
Rank 2
Share this question
or