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

Loading External Javascript Files

1 Answer 265 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 22 May 2013, 05:12 PM
In the Master Page of my ASP.NET 4.0 project I have this code:

<form id="form1" runat="server">
  <%-- Note: The 'AsyncPostBackTimeOut' value was added to try to increase the timeout during debugging; the value is in seconds --%>
  <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" EnablePageMethods="true" AsyncPostBackTimeout="300">
    <Scripts>
      <%-- Note: In order to get jQuery Intellisense working, this procedure had to be followed: http://www.telerik.com/help/aspnet-ajax/introduction-jquery-intellisense.html --%>
      <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
      <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
      <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
 
      <asp:ScriptReference Path="~/Javascript/tools-1.0.1.js" />
      <asp:ScriptReference Path="~/Javascript/common-1.0.1.js" />
    </Scripts>
  </asp:ScriptManager>

Is there any known issue/bug that would prevent those two external Javascript files from being loaded properly each & every time?  Specifically, I'm wondering if anything about the way I'm loading the jQuery files via the Telerik DLL would prevent my own custom Javascript files from being loaded?

I ask because within "common-1.0.1.js" I have 3 related AJAX Request Handlers that are consistently not being loaded when the user starts my app in IE9.  Only after the user presses Ctrl-F5 does the code become active.

Any ideas how to fix this?

Robert

1 Answer, 1 is accepted

Sort by
0
msigman
Top achievements
Rank 2
answered on 22 May 2013, 07:47 PM
Hi Robert,

Have you tried using the script combining feature introduced in Q1 2013? http://www.telerik.com/help/aspnet-ajax/scriptmanager-combine-scripts.html

Also, you can try using CompositeScripts:
<form id="form1" runat="server">
  <%-- Note: The 'AsyncPostBackTimeOut' value was added to try to increase the timeout during debugging; the value is in seconds --%>
  <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" EnablePageMethods="true" AsyncPostBackTimeout="300">
    <Scripts>
      <%-- Note: In order to get jQuery Intellisense working, this procedure had to be followed: http://www.telerik.com/help/aspnet-ajax/introduction-jquery-intellisense.html --%>
      <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
      <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
      <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
  </Scripts>
 
   <CompositeScript>
      <Scripts>
         <asp:ScriptReference Path="~/Javascript/tools-1.0.1.js" />
         <asp:ScriptReference Path="~/Javascript/common-1.0.1.js" />
      </scripts>
   </CompositeScript>
</asp:ScriptManager>
Tags
General Discussions
Asked by
Robert
Top achievements
Rank 1
Answers by
msigman
Top achievements
Rank 2
Share this question
or