Issue on OnClientTabSelecting with Firefox

4 posts, 0 answers
  1. Priya B
    Priya B avatar
    21 posts
    Member since:
    Apr 2010

    Posted 24 May 2010 Link to this post

    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;

    }

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 24 May 2010 Link to this post

    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.
  3. Priya B
    Priya B avatar
    21 posts
    Member since:
    Apr 2010

    Posted 24 May 2010 Link to this post

    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?

  4. Yana
    Admin
    Yana avatar
    5043 posts

    Posted 26 May 2010 Link to this post

    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.
Back to Top