Problem with disabling embedded scripts

10 posts, 0 answers
  1. Rob
    Rob avatar
    34 posts
    Member since:
    Nov 2007

    Posted 22 Jun 2008 Link to this post

    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

  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 23 Jun 2008 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Rob
    Rob avatar
    34 posts
    Member since:
    Nov 2007

    Posted 23 Jun 2008 Link to this post

    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
  5. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 24 Jun 2008 Link to this post

    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
  6. Rob
    Rob avatar
    34 posts
    Member since:
    Nov 2007

    Posted 24 Jun 2008 Link to this post

    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
  7. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 27 Jun 2008 Link to this post

    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
  8. Rob
    Rob avatar
    34 posts
    Member since:
    Nov 2007

    Posted 27 Jun 2008 Link to this post

    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 
  9. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 30 Jun 2008 Link to this post

    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
  10. Rob
    Rob avatar
    34 posts
    Member since:
    Nov 2007

    Posted 11 Jul 2008 Link to this post

    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
  11. Rob
    Rob avatar
    34 posts
    Member since:
    Nov 2007

    Posted 22 Jul 2008 Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017