MouseOver tab selection

4 posts, 0 answers
  1. Tomica
    Tomica avatar
    147 posts
    Member since:
    Apr 2008

    Posted 27 Mar 2014 Link to this post

    I am attempting to add mouseover activation of tabs, per the following article:

    I copied the code, the page loads without error, and the tabs change as intended.

    However I get "Line: 75 Error: Unable to get property 'selectParents' of undefined or null reference" as soon as the mouse moves out of the tabstrip control..

    Running Win 8.1 with I.E. 11 when the error occurs.

    No error with Firefox.

    I would like to know what this error is and how I might adjust the code to prevent or ignore.

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="tabstrip_mouseover.aspx.vb" Inherits="tabstrip_mouseover" %>
    <!DOCTYPE html>
    <head runat="server">
    <form id="form1" runat="server">
       <asp:ScriptManager ID="ScriptManager1" runat="server" />
       <script type="text/javascript" language="javascript">
           function SelectMyTab(sender, args) {
               var multiPageID = sender.get_multiPageID();
           function UnSelectMyTab(e) {
               var tabStrip = $find('<%= RadTabStrip1.ClientID%>');
           //Find the element which the mouse is over
           var destElement = e.relatedTarget || e.toElement;
           if ($telerik.isDescendant(tabStrip.get_element(), destElement))
           var initialTab = tabStrip.findTabByText("<%= MyTab %>");
       <telerik:RadTabStrip ID="RadTabStrip1" runat="server" UnSelectChildren="true" OnClientMouseOver="SelectMyTab" ClickSelectedTab="True" AutoPostBack="True" onmouseout="UnSelectMyTab(event)" SelectedIndex="0" Skin="Outlook" MultiPageID="RadMultiPage1">
               <telerik:RadTab ID="Tab1" runat="server" Text="Root Tab 1">
                       <telerik:RadTab ID="Tab2" runat="server" Text="Child Tab 1.1" PageViewID="PageView1">
                       <telerik:RadTab ID="Tab3" runat="server" Text="Child Tab 1.2" PageViewID="PageView2">
               <telerik:RadTab ID="Tab4" runat="server" Text="Root Tab 2">
                       <telerik:RadTab ID="Tab5" runat="server" Text="Child Tab 2.1" PageViewID="PageView3">
                       <telerik:RadTab ID="Tab6" runat="server" Text="Child Tab 2.2" PageViewID="PageView4">
                       <telerik:RadTab ID="Tab7" runat="server" Text="Child Tab 2.3" PageViewID="PageView5">
               <telerik:RadTab ID="Tab8" runat="server" Text="Root Tab 3">
                       <telerik:RadTab ID="Tab9" runat="server" Text="Child Tab 3.1" PageViewID="PageView6">
       <telerik:RadMultiPage ID="RadMultiPage1" runat="server" Height="454px" Width="737px">
           <telerik:RadPageView ID="PageView1" runat="server">
               Child Tab 1.1</telerik:RadPageView>
           <telerik:RadPageView ID="PageView2" runat="server" Width="100%">
               Child Tab 1.2</telerik:RadPageView>
           <telerik:RadPageView ID="PageView3" runat="server" Width="100%">
               Child Tab 2.1</telerik:RadPageView>
           <telerik:RadPageView ID="PageView4" runat="server" Width="100%">
               Child Tab 2.2</telerik:RadPageView>
           <telerik:RadPageView ID="PageView5" runat="server" Width="100%">
               Child Tab 2.3</telerik:RadPageView>
           <telerik:RadPageView ID="PageView6" runat="server" Width="100%">
               Child Tab 3.1</telerik:RadPageView>

    Imports System
    Imports System.Data
    Imports System.Data.SqlClient
    Imports System.Configuration
    Imports System.Collections
    Imports System.Web
    Imports System.Web.Security
    Imports System.Web.UI
    Imports System.Web.UI.WebControls
    Imports System.Web.UI.WebControls.WebParts
    Imports System.Web.UI.HtmlControls
    Imports Telerik.Web.UI
    Partial Public Class tabstrip_mouseover
        Inherits System.Web.UI.Page
        Protected MyTab As String
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
            MyTab = RadTabStrip1.InnermostSelectedTab.Text
        End Sub
    End Class

  2. Tomica
    Tomica avatar
    147 posts
    Member since:
    Apr 2008

    Posted 27 Mar 2014 in reply to Tomica Link to this post

    Update: the error seems to be isolated to my development environment, which is Visual Studio 2013 and IIS Express, i.e. pretty standard setup.

    I added a try / catch block on the troublesome un-select code, but I do not know what I might be losing by doing so.

    Perhaps it is not necessary, my experience with server-side programming in VB is that selecting one tab automatically un-selects the previous selection. Unsure of every step I take with client-side <g>
  3. DevCraft R3 2016 release webinar banner
  4. Nencho
    Nencho avatar
    1446 posts

    Posted 01 Apr 2014 Link to this post

    Hello Thomas,

    I tried to replicate the described issue, following the provided steps for reproduction, but to no avail. I was unable to observe any error, when the mouse moves out of the RadTabStrip control. Could you specify which version of our controls are you currently using?


    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

  5. Tomica
    Tomica avatar
    147 posts
    Member since:
    Apr 2008

    Posted 06 Apr 2014 in reply to Nencho Link to this post

    Error only occurs on IIS Express in development environment.

    I have not been able to duplicate it elsewhere, so let's just "assume" the problem lies within IIS and can be safely ignored.
Back to Top