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

Error using Load on Demand Tab Strip

4 Answers 128 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Brent
Top achievements
Rank 1
Brent asked on 12 Nov 2009, 09:40 AM
Hi all,

I'm having some problems getting the load on demand style of RadTabStrips working. When I hit the page the first tab loads as expected, but then when I click any of the other tabs I get the loading panel's animation and the following JavaScript error:

Error: $telerik.$ is not a function
Source File: http://localhost:54085/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a1247b7d8-6b6c-419f-a45f-8ff264c90734%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2009.3.1103.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a4552b812-caf7-4129-9b53-8f199b5bce6c%3a16e4e7cd%3af7645509%3aed16cbdc%3a24ee1bba%3ae330518b%3a1e771326%3a8e6f0d33%3a6a6d718d
Line: 2679

The TabClick event handler in my code behind never gets hit.

The aspx code is:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="ContactTestingLod.aspx.vb" 
    Inherits="Eclipse3.ContactTestingLod" %> 
 
<%@ Register Src="ContactDetails.ascx" TagName="ContactDetails" TagPrefix="uc1" %> 
<%@ Register Src="ContactSupervisorDetails.ascx" TagName="ContactSupervisorDetails" 
    TagPrefix="uc2" %> 
<%@ Register Src="ContactUserDetails.ascx" TagName="ContactUserDetails" TagPrefix="uc3" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
    <title></title
</head> 
<body> 
    <form runat="server" id="mainForm" method="post"
    <telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> 
    <telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1" /> 
    <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadTabStrip1"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadTabStrip1" /> 
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="LoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
            <telerik:AjaxSetting AjaxControlID="RadMultiPage1"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" LoadingPanelID="LoadingPanel1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 
 
    <script type="text/javascript"
 
        function onTabSelecting(sender, args) { 
            if (args.get_tab().get_pageViewID()) { 
                args.get_tab().set_postBack(false); 
            } 
        } 
             
    </script> 
 
    <telerik:RadTabStrip OnClientTabSelecting="onTabSelecting" ID="RadTabStrip1" SelectedIndex="0" 
        runat="server" MultiPageID="RadMultiPage1" /> 
    <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0" OnPageViewCreated="RadMultiPage1_PageViewCreated" /> 
    </form> 
</body> 
</html> 

and the code behind is:

Imports Telerik.Web.UI 
 
Partial Public Class ContactTestingLod 
    Inherits System.Web.UI.Page 
 
    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load 
        If Not Page.IsPostBack Then 
            AddTab("Contact Details""ContactDetails"
            AddPageView(RadTabStrip1.FindTabByValue("ContactDetails")) 
            AddTab("Supervisor Details""ContactSupervisorDetails"
            AddTab("User Details""ContactUserDetails"
        End If 
    End Sub 
 
    Private Sub AddTab(ByVal tabName As StringByVal tabValue As String
        Dim tab As RadTab = New RadTab 
        tab.Text = tabName 
        tab.Value = tabValue 
        RadTabStrip1.Tabs.Add(tab) 
    End Sub 
 
    Private Sub AddPageView(ByVal tab As RadTab) 
        Dim pageView As RadPageView = New RadPageView 
        pageView.ID = tab.Value 
        RadMultiPage1.PageViews.Add(pageView) 
        tab.PageViewID = pageView.ID 
    End Sub 
 
    Protected Sub RadMultiPage1_PageViewCreated(ByVal sender As ObjectByVal e As RadMultiPageEventArgs) Handles RadMultiPage1.PageViewCreated 
        Dim userControlName As String = e.PageView.ID & ".ascx" 
        Dim userControl As Control = Page.LoadControl(userControlName) 
        userControl.ID = e.PageView.ID & "_userControl" 
        e.PageView.Controls.Add(userControl) 
    End Sub 
 
    Protected Sub RadTabStrip1_TabClick(ByVal sender As ObjectByVal e As RadTabStripEventArgs) Handles RadTabStrip1.TabClick 
        AddPageView(e.Tab) 
        e.Tab.PageView.Selected = True 
    End Sub 
 
End Class 

Any thoughts or pointers would be very much appreciated!



4 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 17 Nov 2009, 03:16 PM
Hi Brent Wheeldon,

This is strange as I cannot see any reference to the $telerik.$ in your code. The load on demand online demo is working fine, what could be different in your case?

Sincerely yours,
Veselin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Brent
Top achievements
Rank 1
answered on 18 Nov 2009, 12:46 AM
Hi Veselin,

As the error actually states, the $telerik.$ error is actually coming from webresources.axd (so from the compiled in Telerik JS resources). I've obviously not set something up correctly, but I can't work out what.

Any help would be great.

Brent.
0
Paul
Telerik team
answered on 20 Nov 2009, 01:24 PM
Hi Brent,

We tried to reproduce the reported issue using your code snippet, but to no avail. It will be best if you can open a support ticket and send us a simplified running project (incl. your custom skins, CSS, images, DB backup if needed and so on) demonstrating the problem (and step-by-step instructions on doing so). In that way we can reproduce and pinpoint the problems you're facing on our side, understand the logic of your application and provide a solution.

Regards,
Paul
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Brent
Top achievements
Rank 1
answered on 23 Nov 2009, 12:54 AM
Hi Paul,

Thanks for your reply. We've changed the way this page works now, so it's not a pressing issue. We were getting this error in another page (using the RAD Scheduler control, not the RAD tab strip), and we were able to trace the problem back to the skin. If we do use the RAD Tab Strip again and come across this problem I will post back with some more details.

Cheers,

Brent
Tags
TabStrip
Asked by
Brent
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Brent
Top achievements
Rank 1
Paul
Telerik team
Share this question
or