+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / NewsView - JQuery

NewsView - JQuery

6 posts, 0 answered
  1. George
    George  avatar
    204 posts
    Registered:
    05 Sep 2006
    22 Mar 2010
    Link to this post
    Hi,

    Since there is a problem with the sitefinity forum and i can't post on the "developing with sitefinity" thread, i decided to post this here.

    I have a problem with the NewsView control and specifically with the DETAIL mode. the problem occurred on two different websites. The scenario is as follows:

    1- Create a news list page and set the mode of the NewsView to Master
    2- Create a specific news details page and set the mode of the News view to Detail
    3- In the master page add a reference to Jquery  (1.3.min)
    4- write any code that uses JQuery 
    5- Go the news list page and from there to the news details page and you will notice the following error: Error: $("[id$='_hlSignIn']").click is not a function

    I tried to troubleshoot jquery's compatibility and changed the $ to JQuery but still the same error.

    Please advice.

    Appreciate it

    G

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    22 Mar 2010
    Link to this post
    Hello G-force,

    I tried to reproduce the problem using reference directly to the last version of jQuery and everything was working fine at my end. Please check the js code you use and whether the .js file is correctly loaded

    <%@ Master Language="C#" %>
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     
    <script runat="server">
     
    </script>
     
    <head runat="server">
      <script src="http://code.jquery.com/jquery-latest.js"></script>
        <title></title>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />    
    </head>
    <body>
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server">
            </asp:ScriptManager>
            <div id="wrapper">
            <div id="Header">
                <h1>My Organization</h1>
                <div id="TopNavigation">
                    <asp:contentplaceholder id="TopMenu" runat="server"></asp:contentplaceholder>           
                </div>
            </div>
            <div id="Main"><asp:contentplaceholder id="Content" runat="server"></asp:contentplaceholder></div>
            <div id="SideBar"><asp:contentplaceholder id="SideBarContent" runat="server"></asp:contentplaceholder></div>   
            <div id="Footer">2006-2007 © MyOrganization. All rights reserved </div>
           </div>
               
       </form>
        <input name="InputButtonhlSignIn" type="button" />
        <script type="text/javascript">
            $("input[name$='hlSignIn']").attr('value', 'click me');
            $("input[name$='hlSignIn']").click(function() {
                alert('Handler for .click() called.');
            });
    </script>
    </body>
    </html>


    Regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. George
    George  avatar
    204 posts
    Registered:
    05 Sep 2006
    22 Mar 2010
    Link to this post
    Hi Ivan,

    I have removed the "<telerik:JsFileLink id="jsLink" runat="server" ScriptType="jQuery" />" from the external template and it worked.

    Thank you !

    G
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    22 Mar 2010
    Link to this post
    Hello G-force,

    Can you try adding the script reference like that:
    <asp:ScriptManager id="ScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Name="jQuery" Path="http://code.jquery.com/jquery-latest.js" />
        </Scripts>
    </asp:ScriptManager>


    Sincerely yours,
    Radoslav Georgiev
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. Ahmed Salman
    Ahmed Salman avatar
    31 posts
    Registered:
    13 Apr 2010
    22 Apr 2010
    Link to this post
    I need to do something like what did you do ?

    so when you say "news list page " you mean .ascx control ??

    can i get a copy of your example ??

  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    22 Apr 2010
    Link to this post
    Hello Ahmed Salman,

    ""news list page " you mean .ascx control"

    Most probably he was talking about the external template of the NewsView control that is used by Master behavior mode. All external templates are available for downloading at your account >> Download section.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Register for webinar
6 posts, 0 answered