More in this section

Forums / Developing with Sitefinity / Kendo or jQuery UI

Kendo or jQuery UI

4 posts, 1 answered
  1. Ben
    Ben avatar
    6 posts
    Registered:
    22 Jun 2011
    26 May 2012
    Link to this post
    I have been working with Sitefinity for only a short while, and I am trying to get either jQueryUI or KendoUI to work in my user controls. What I have researched doesn't seem to be working. I was hoping someone could steer me in the right direction.

    Here is what I have:
    <%@ Control Language="C#" AutoEventWireup="true" CodeFile="ContactForm.ascx.cs" Inherits="UserControls_ContactForm" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls"
        Assembly="Telerik.Sitefinity, Version=5.0.2860.0, Culture=neutral, PublicKeyToken=b28c218413bdf563" %>
         
    <sf:JavaScriptEmbedControl ID="script2" runat="server" ScriptEmbedPosition="BeforeBodyEndTag"
        Url="~/App_Data/Sitefinity/WebsiteTemplates/snbTemplate/JS/jQueryUI/js/jquery-ui-1.8.20.custom.min.js" />
    <sf:JavaScriptEmbedControl ID="script3" runat="server" ScriptEmbedPosition="BeforeBodyEndTag"
        Url="~/App_Data/Sitefinity/WebsiteTemplates/snbTemplate/JS/Kendo%20UI/js/kendo.all.min.js" />
        <script>
            $(document).ready(function() {
                $("#txtDate1").datepicker();
                $("#txtDate2").kendoDatePicker();
            });
        </script>
    jQueryUI:
    <asp:TextBox ID="txtDate1" runat="server"></asp:TextBox>
    <br />
    kendo UI: <asp:TextBox ID="txtDate2"
        runat="server"></asp:TextBox>

    Am I incorrectly trying to load these js files?
  2. MB
    MB avatar
    302 posts
    Registered:
    09 Jan 2005
    27 May 2012
    Link to this post
    I guess the most glaring discrepancy is the jQuery reference to the ID of an asp:textbox

    For the jQuery reference to be valid, you either need to use ClientIdMode="static" or a standard <input type="text".

    Re: Loading js library files in a user control - See this instructive blog.
    http://blog.falafel.com/Blogs/george-saadeh/2012/05/09/using-jquery-and-other-javascript-libraries-in-sitefinity
    Answered
  3. Ben
    Ben avatar
    6 posts
    Registered:
    22 Jun 2011
    27 May 2012
    Link to this post
    Sorry I should have noted after I posted, I changed the ClientIDMode to Static. That still didn't help the issue. I will look into the rest. Thank you.
  4. Ben
    Ben avatar
    6 posts
    Registered:
    22 Jun 2011
    27 May 2012
    Link to this post
    The link you provided was the answer I was looking for. Thank you for the help!
4 posts, 1 answered