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

Firing client side javascript from clicking any item in a tabstrip

1 Answer 47 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
IrishManInUSA
Top achievements
Rank 1
IrishManInUSA asked on 18 Sep 2008, 02:33 AM
I want to fire off a client side javascript function when the user clicks on a item in my tab strip. This is what I have in terms of the tab strip, I have tried all of the events and so far nothing seems to be firing. Any help would be appreciated.

<rad:RadTabStrip ID="radPersTabs" runat="server" MultiPageID="radmultipage" OnClientTabSelected ="buildPdfCost" >

<Tabs>

<rad:RadTab Text="1. Verse" Selected="true" SelectedCssClass="selected-tab" HoveredCssClass="hovered-tab">

</rad:RadTab>

<rad:RadTab Text="2. Personalization" SelectedCssClass="selected-tab" HoveredCssClass="hovered-tab">

</rad:RadTab>

<rad:RadTab Text="3. Envelopes" SelectedCssClass="selected-tab" HoveredCssClass="hovered-tab">

</rad:RadTab>

<rad:RadTab Text="4. Preview" SelectedCssClass="selected-tab" HoveredCssClass="hovered-tab">

</rad:RadTab>

</Tabs>

</rad:RadTabStrip>

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 Sep 2008, 06:55 AM
Hi John,

Try with OnClientTabSelecting event which will occur before the tab is selected.

ASPX:
<telerik:RadTabStrip ID="RadTabStrip1" runat="server" OnClientTabSelecting="OnClientTabSelecting"   > 
         < 

JS:
<script  language="javascript" type="text/javascript"
     function OnClientTabSelecting(sender, eventArgs) 
     { 
      var tab = eventArgs.get_tab().get_text(); 
      alert(tab) 
     } 
<script/> 


Thanks
Shinu.
Tags
TabStrip
Asked by
IrishManInUSA
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or