Problems getting jQuery scripts to work if only added to the

Posted by Community Admin on 04-Aug-2018 18:58

Problems getting jQuery scripts to work if only added to the master page

All Replies

Posted by Community Admin on 02-May-2012 00:00

I have a custom widget control that uses jQuery. It only works if I add the jQuery lib to the master page AND to the user control. Adding it only in the master page OR the user control and it doesn't work. Also, it only works if I add the scripts using a JavascriptEmbedControl. If I add them using ResourceLinks, in both places OR in one or the other it never works.
What's going on? Can someone clarify?

Thanks

Posted by Community Admin on 03-May-2012 00:00

Anyone?

Posted by Community Admin on 01-Jun-2012 00:00

My first question is how are you including your javascript libraries to your sitefinity project.  I have not had the same issue you are describing using the following method on my master page.

<asp:ScriptManager ID="ScriptManager" runat="server" LoadScriptsBeforeUI="true"  >
    <Scripts>
        <asp:ScriptReference  Path="~/Sitefinity/WebsiteTemplates/NiSource/App_Themes/Default/JavaScript/jquery-1.7.1.min.js" ScriptMode="Release" />
    </Scripts>
</asp:ScriptManager>



And then by doing the following on my user control:
<asp:ScriptManagerProxy ID="test" runat="server">
<Scripts>
    <asp:ScriptReference Path="~/Path/javascript.js" ScriptMode="Release" />
</Scripts>
</asp:ScriptManagerProxy>

 

 

 

 

This thread is closed