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

Issue on OnClientTabSelecting with Firefox

3 Answers 28 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Priya B
Top achievements
Rank 1
Priya B asked on 24 May 2010, 11:04 AM

Hi there,

event object returns null value in Firefox.  Do you have any other solution for this?

 

function

 

OnTabSelected(sender, eventArgs)

 

{

 

function OnAfterCallBack()

 

{

selectedTabElement.style.cursor = originalCursor;

}

 

var selectedTabElement = event.srcElement;

 

 

var originalCursor = selectedTabElement.style.cursor;

 

 

selectedTabElement.style.cursor =

'wait';

 

_postCallBackFunc = OnAfterCallBack;

}

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 24 May 2010, 12:12 PM
Hello Priya ,

Try the following approach rather than using the 'event' object.

Java Script:

 <script type=
"text/javascript"
      function OnTabSelected(sender, eventArgs) { 
        function OnAfterCallBack() { 
            selectedTabElement.style.cursor = originalCursor; 
        } 
        var selectedTabElement = eventArgs.get_tab().get_outerWrapElement(); 
        var originalCursor = selectedTabElement.style.cursor; 
        selectedTabElement.style.cursor = 'wait'
        _postCallBackFunc = OnAfterCallBack; 
 
    } 
 
</script> 
 

Regards,
Shinu.
0
Priya B
Top achievements
Rank 1
answered on 24 May 2010, 12:27 PM
Hello Shinu

I tried with your sample. Still its not working in Firefox. it says : "eventArgs.get_tab is not a function".

try

{

 

var selectedTabElement = eventArgs.get_tab().get_outerWrapElement();

 

 

}

 

catch (e)

 

{

alert(

'tab: ' + e.message);

 

}

Could you please give me a solution?

0
Yana
Telerik team
answered on 26 May 2010, 02:46 PM
Hello Priya,

This works at our side:

<telerik:RadTabStrip ID="RadTabStrip1" runat="server" OnClientTabSelected="OnTabSelected">
    <Tabs>
        <telerik:RadTab Text="tab 1" />
        <telerik:RadTab Text="tab 2" />
    </Tabs>
</telerik:RadTabStrip>

and the javascript function:

function OnTabSelected(sender, eventArgs) {
    try {
        var selectedTabElement = eventArgs.get_tab().get_outerWrapElement();
        alert(eventArgs.get_tab().get_text());
    }
    catch (e) {
        alert('tab: ' + e.message);
    }
}


All the best,
Yana
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
TabStrip
Asked by
Priya B
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Priya B
Top achievements
Rank 1
Yana
Telerik team
Share this question
or