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

Problem with disabling embedded scripts

9 Answers 246 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 2
Rob asked on 22 Jun 2008, 10:24 AM
When disabling embedded scripts for the tabstrip (and the splitter) and including the script reference paths manually in the scriptmanager, errors occur.

The offending file seems to be TabStrip/RadTabStripScripts.js and causes an error in the microsoft ajax debug js file that 'basetype' cannot be undefined. This is in the Type$registerClass(typeName, baseType, interfaceTypes) function.

We are trying to serve all scripts from an external resource, so have the scriptmanager scriptspath set to another location for microsoft ajax scripts, have embedded scripts turned off for telerik controls in the web.config and the following scripts included for all controls used by the site in the master page:

<asp:ScriptReference Path="~/Scripts/Common/Core.js" />
<asp:ScriptReference Path="~/Scripts/Common/Animation/AnimationScripts.js" />
<asp:ScriptReference Path="~/Scripts/Common/Navigation/NavigationScripts.js" />
<asp:ScriptReference Path="~/Scripts/Common/Popup/PopupScripts.js" />
<asp:ScriptReference Path="~/Scripts/Ajax/Ajax.js" />
<asp:ScriptReference Path="~/Scripts/Grid/RadGridScripts.js" />
<asp:ScriptReference Path="~/Scripts/Menu/RadMenuScripts.js" />
<asp:ScriptReference Path="~/Scripts/Menu/ContextMenu/RadContextMenuScripts.js" />
<asp:ScriptReference Path="~/Scripts/Splitter/RadPane.js" />
<asp:ScriptReference Path="~/Scripts/Splitter/RadSlidingPane.js" />
<asp:ScriptReference Path="~/Scripts/Splitter/RadSlidingZone.js" />
<asp:ScriptReference Path="~/Scripts/Splitter/RadSplitBar.js" />
<asp:ScriptReference Path="~/Scripts/Splitter/RadSplitter.js" />
<asp:ScriptReference Path="~/Scripts/Splitter/SplitterItem.js" />
<asp:ScriptReference Path="~/Scripts/Splitter/SplitterPaneBase.js" />
<asp:ScriptReference Path="~/Scripts/TabStrip/RadTabStripScripts.js" />
<asp:ScriptReference Path="~/Scripts/TabStrip/MultiPage/RadMultiPageScripts.js" />
<asp:ScriptReference Path="~/Scripts/TreeView/RadTreeViewScripts.js" />


Kind regards,

Rob

9 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 23 Jun 2008, 01:17 PM
Hello Rob,

I couldn't reproduce the problem locally using the latest version of RadControls for ASP.NET Ajax (2008.1.619). Please find attached my test web site. Maybe I am missing something important.

Regards,
Albert
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Rob
Top achievements
Rank 2
answered on 23 Jun 2008, 04:01 PM
Hi Albert,

sorry I didn't mention this was part of an ongoing issue moved from this thread:
http://www.telerik.com/community/forums/thread/b311D-bccedc.aspx

I think this issue may be something to do with .Net 3.5.

I can get your example to break, simply open visual studio 2008, open your example website and upgrade it to .Net 3.5.
Include necessary Dlls(telerik.web.ui) and spin it up.

Cheers,

Rob
0
Atanas Korchev
Telerik team
answered on 24 Jun 2008, 06:30 AM
Hi Rob,

Unfortunately upgrading the website to 3.5 didn't cause any issues on my end. I am sending you the updated web site. Does it run on your end?

Looking forward to your reply,
Albert
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Rob
Top achievements
Rank 2
answered on 24 Jun 2008, 10:12 AM
Hi Albert,

yes that still breaks, the only difference I can see is that I'm running it in debug mode whereas your config file has debug = "false"
Cheers,

Rob
0
Tsvetie
Telerik team
answered on 27 Jun 2008, 11:19 AM
Hi Rob,
I was able to reproduce the problem with <compilation debug="true">. In order to fix the problem, you have to :
  1. EnableEmbeddedScripts="false" for the RadPanes as well as the RadSplitter.
  2. Move the SplitterItem.js and SplitterPaneBase.js ScriptReference declarations above the one of the RadPane.js.
  3. Add a ScriptReference for the Scripts/Common/Scrolling/ScrollingScripts.js as well - it is necessary for the RadTabStrip.

For example:

<asp:ScriptManager ID="ScriptManager1" runat="server">  
    <Scripts> 
        <asp:ScriptReference Path="~/Scripts/Common/Core.js" /> 
        <asp:ScriptReference Path="~/Scripts/Common/Animation/AnimationScripts.js" /> 
        <asp:ScriptReference Path="~/Scripts/Common/Navigation/NavigationScripts.js" /> 
        <asp:ScriptReference Path="~/Scripts/Common/Scrolling/ScrollingScripts.js" /> 
        <asp:ScriptReference Path="~/Scripts/Common/Popup/PopupScripts.js" /> 
        <asp:ScriptReference Path="~/Scripts/Ajax/Ajax.js" /> 
        <asp:ScriptReference Path="~/Scripts/Grid/RadGridScripts.js" /> 
        <asp:ScriptReference Path="~/Scripts/Menu/RadMenuScripts.js" /> 
        <asp:ScriptReference Path="~/Scripts/Menu/ContextMenu/RadContextMenuScripts.js" /> 
        <asp:ScriptReference Path="~/Scripts/Splitter/SplitterItem.js" /> 
        <asp:ScriptReference Path="~/Scripts/Splitter/SplitterPaneBase.js" /> 
        <asp:ScriptReference Path="~/Scripts/Splitter/RadPane.js" /> 
        <asp:ScriptReference Path="~/Scripts/Splitter/RadSlidingPane.js" /> 
        <asp:ScriptReference Path="~/Scripts/Splitter/RadSlidingZone.js" /> 
        <asp:ScriptReference Path="~/Scripts/Splitter/RadSplitBar.js" /> 
        <asp:ScriptReference Path="~/Scripts/Splitter/RadSplitter.js" /> 
          
        <asp:ScriptReference Path="~/Scripts/TabStrip/RadTabStripScripts.js" /> 
        <asp:ScriptReference Path="~/Scripts/TabStrip/MultiPage/RadMultiPageScripts.js" /> 
        <asp:ScriptReference Path="~/Scripts/TreeView/RadTreeViewScripts.js" /> 
    </Scripts> 
</asp:ScriptManager> 

<telerik:RadSplitter runat="server" ID="RadSplitter1" EnableEmbeddedScripts="false">  
    <telerik:RadPane runat="server" ID="RadPane1" EnableEmbeddedScripts="false"

We will update the help topic accordingly.

Best wishes,
Tsvetie
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Rob
Top achievements
Rank 2
answered on 27 Jun 2008, 03:29 PM
Hi Tsvetie,

many thanks for your efforts on this, all embedded telerik scripts are now removed and served up elsewhere and your suggestions worked!

There is just one more outstanding issue (which may not be with telerik controls).
This is that with the microsoft scripts served from elsewhere (using the scriptmanager's scriptspath attribute, we still get odd javascript errors with the tabstrip control)

This should be easy to recreate, but let me know if you would like to send you an example.

Kind regards,

Rob 
0
Atanas Korchev
Telerik team
answered on 30 Jun 2008, 09:03 AM
Hello Rob,

Could you please let us know how to reproduce those errors? Thanks.

Regards,
Albert
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Rob
Top achievements
Rank 2
answered on 11 Jul 2008, 02:59 PM
Hi Albert,

sorry for the late reply, but thiese issues have been a lower priority of late.

I will look into it hopefully this weekend, but it looks like it may be an issue with AjaxToolkit controls being rendered within Telerek tab pages, both sets of controls using external script loading.

Cheers,

Rob
0
Rob
Top achievements
Rank 2
answered on 22 Jul 2008, 03:43 PM
Hi there,

I can confirm this was an issue with ajax toolkit controls being dynamically added to a page with the scriptpath property set meaning the scripts were never present in the page for cient side functionality. It was resolved by adding all required ajaxtoolkit scripts to the scriptmanager initially and wasn't an issue with the telerik controls.

Cheers,

Rob
Tags
TabStrip
Asked by
Rob
Top achievements
Rank 2
Answers by
Atanas Korchev
Telerik team
Rob
Top achievements
Rank 2
Tsvetie
Telerik team
Share this question
or