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

Mousemove is not working in TabStrip

1 Answer 55 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Kamalakannan
Top achievements
Rank 1
Kamalakannan asked on 25 Oct 2010, 02:22 PM
Hi,
    I have a problem in my application where i have used Tabstrip control in UserControl and i have used this UserControl in my aspx page. Please find the code below.


--%><telerik:RadMultiPage ID="RadMultiPage1" runat="server" Width="922px" Height="268px"></telerik:RadMultiPage><%--
    --%><telerik:RadTabStrip ID="RadTabStrip1" runat="server" Height="43px"
        Orientation="HorizontalBottom" EnableEmbeddedSkins="False" Skin="Marquee" Width="922px"
        MultiPageID="RadMultiPage1" 
        OnClientMouseOver="SelectMyTab" ClickSelectedTab="True" OnClientMouseOut="UnSelectMyTab(event)"
        OnClientTabSelected="OnSelected" CausesValidation="False">
    </telerik:RadTabStrip>
    <script language="javascript" type ="text/javascript">
//       function ClientMouseOverHandler(sender, eventArgs)
//       {
//        var tabStrip = sender;
//        var tab = eventArgs.Tab;
//        var browserEvents = eventArgs.EventObject;
//        alert("You have just moved over the " + tab.Text + " tabs in the " + tabStrip.ID + " tabstrip");
//        alert("Mouse coordinates: " + browserEvents.clientX + ":" + browserEvents.clientY); 
//       }
        function SelectMyTab(obj, args)           
        {           
            alert("OnMouseOver");
            args.Tab.Select();   
        }
          
        function UnSelectMyTab(e)           
        {     
            var tabStrip = <%= RadTabStrip1.ClientID%>;   
            var z=<%= RadTabStrip1.ClientID%>.SelectedTab;    
           //alert(z.Text);  
            var selectedtab;     
            //Find the element which the mouse is over     
            var destElement = e.relatedTarget || e.toElement;  
            //Check if that element is part of the tabstrip   
            while (destElement)     
            {     
                if (destElement.parentNode == tabStrip.DomElement)     
                {     
                    return;     
                }     
                destElement = destElement.parentNode;     
            }     
        
          
        function OnSelected(sender, eventArgs)  
        {  
             alert("OnSelected");
             var currentTab = <%= RadTabStrip1.ClientID %>.SelectedTab;  
             return false;  
        }  
    </script>


My requirement is Tab should get activated in Mousemove. Butt tabs are working proper in OnClick event. But it is not working in MouseOver event.

Please help me.

Thanks in Advance

 

 

 

1 Answer, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 25 Oct 2010, 07:56 PM
I believe the problem is with you OnClientMouseOut="UnSelectTab(event)", which shouldn't be written this way. Try removing it and tell me if the mouse over event works or not.
Tags
TabStrip
Asked by
Kamalakannan
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Share this question
or