Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • siva kumar 120 posts 209 karma points
    Apr 23, 2013 @ 09:16
    siva kumar
    0

    jquery method not calling in umbraco 4.7.1.1?

     

     

    timepicker() method is not executing correctly.

    <umb:CssInclude ID="CssInclude2" runat="server" FilePath="~/jquery-ui-timepicker-addon.css"  PathNameAlias="UmbracoClient" />
    <umb:CssInclude ID="CssInclude1" runat="server" FilePath="~/jquery-ui.css"   PathNameAlias="UmbracoClient" />
       <umb:JsInclude ID="JsInclude4" runat="server" FilePath="~/jquery-ui.js" Priority="0"  />
       <umb:JsInclude ID="JsInclude2" runat="server" FilePath="~/scripts/jquery-ui-sliderAccess.js"   />
       <umb:JsInclude ID="JsInclude3" runat="server" FilePath="~/jquery-ui-timepicker-addon.js"  />
     
    <script type="text/javascript">
        $(function () {
            $('#l1').timepicker();
        }); 
       
        </script>

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 23, 2013 @ 12:12
    Dave Woestenborghs
    0

    I don't see you including the jQuery library it self. Can this be the problem ?

    Also you can try changing your script to

     

    $(document).ready(function() {

    $('#l1).timepicker();

    });

    Dave

  • siva kumar 120 posts 209 karma points
    Apr 23, 2013 @ 13:09
    siva kumar
    0

    thank you for replying me,

    i added those jquery files in umbraco  at Scripts and css folders at the backend.the id "l1" belongs to a asp.net server control textbox.if i changed to alert("hi");it is working but the method in the jquery not calling.how to solve this.

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 23, 2013 @ 13:10
    Dave Woestenborghs
    0

    Do you include jQuery itself ? I don't see it in your code example

    Dave

  • siva kumar 120 posts 209 karma points
    Apr 24, 2013 @ 06:31
    siva kumar
    0

    yes i included.

  • siva kumar 120 posts 209 karma points
    Apr 24, 2013 @ 08:49
    siva kumar
    0

      <link href="jquery-ui-timepicker-addon.css" rel="stylesheet" type="text/css" />

    <link href="jquery-ui.css" rel="stylesheet" type="text/css" />

         <script src="Scripts/jquery-1.9.1.js" type="text/javascript"></script>
    <script src="Scripts/jquery-ui.js" type="text/javascript"></script>
        <script src="jquery-ui-sliderAccess.js" type="text/javascript"></script>
          <script src="jquery-ui-timepicker-addon.js" type="text/javascript"></script>
      
    <script type="text/javascript">
        $(function () {
            $('#l1').timepicker();
        }); 
       
        </script>

     

    even it is not working

     

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 24, 2013 @ 13:43
    Dave Woestenborghs
    0

    can you try this code : 

    $(document).ready(function() {

    $('#l1).timepicker();

    });

    And is #l1 the id ? Some times .NET controls render another ID on the clientside depending on framework version or settings.

  • siva kumar 120 posts 209 karma points
    Apr 25, 2013 @ 08:08
    siva kumar
    0

    i tried with this code and it is working if add total code in template then it working.but i need usercontrol with this.

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 25, 2013 @ 09:14
    Dave Woestenborghs
    0

    Can you post the code of the user control ?

  • siva kumar 120 posts 209 karma points
    Apr 25, 2013 @ 13:10
    siva kumar
    0

    i did not write backend code .just i want to try to get user inteface of picker.is it correct procedure to include them in umbraco?

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 26, 2013 @ 08:03
    Dave Woestenborghs
    0

    Can you post the code of usercontrol and template. Maybe then I can see what is going wrong ?

     

  • siva kumar 120 posts 209 karma points
    Apr 26, 2013 @ 09:17
    siva kumar
    0

    hi  dawoe ,this is template and usercontrol code

    this is the template code here it is working

    <link rel="stylesheet" href="/css/jquery-ui.css" />
        <link rel="stylesheet" href="/css/jquery-ui-timepicker-addon.css"  />
    <script src="/scripts/jquery-1.9.1.js" type="text/javascript"></script>
    <script src="/scripts/jquery-ui.js" type="text/javascript"></script>
        <script src="/scripts/jquery-ui-sliderAccess.js" type="text/javascript"></script>
        <script src="/scripts/jquery-ui-timepicker-addon.js" type="text/javascript"></script>
      

        <script type="text/javascript">
                       $(function () {
            $('#ContentPlaceHolderDefault_l2').timepicker();
        });
        </script>
        <form id="f1" runat="server">
       
           <asp:TextBox runat="server" ID="l2" ></asp:TextBox>


        </form>



    this is ascx usercontrol not working

    <html >
    <head >
    <title></title>
    <umb:CssInclude ID="CssInclude2" runat="server" FilePath="~/Css/jquery-ui-timepicker-addon.css" />
    <umb:CssInclude ID="CssInclude1" runat="server" FilePath="~/Css/jquery-ui.css" />
    <umb:JsInclude ID="JsInclude1" runat="server" FilePath="~/Js/jquery-1.9.1.js" Priority="1" />
    <umb:JsInclude ID="JsInclude4" runat="server" FilePath="~/Js/jquery-ui.js" Priority="2" />
    <umb:JsInclude ID="JsInclude2" runat="server" FilePath="~/Js/jquery-ui-sliderAccess.js" Priority="3" />
    <umb:JsInclude ID="JsInclude3" runat="server" FilePath="~/Js/jquery-ui-timepicker-addon.js" Priority="4" />
      <script type="text/javascript">
    $(function () {
            $('#ContentPlaceHolderDefault_l1').timepicker();
        });
    </script>

    </head>
    <body>

    <asp:TextBox runat="server" ID="l1" ></asp:TextBox></div>
    </body>


    </html>

    it is not working

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 26, 2013 @ 09:25
    Dave Woestenborghs
    0

    Hi,

    A few things i notice :

    1 .I see html and body tags in your usercontrol. Those shouldn't be there. That should be in your template.

    2. You are using client dependency framework in your usercontrol to add css and js. But there is nothing defined for that in your template. You should have a clientdependency loader in your template:

     <cd:ClientDependencyLoader ID="ClientDependencLoader" runat="server">
        </cd:ClientDependencyLoader> 

    3. The ID of your textbox and the one in your javascript don't match.

    Dave

     

     

  • siva kumar 120 posts 209 karma points
    Apr 26, 2013 @ 11:11
    siva kumar
    0

    hi dave

    i tried deleting html tags even the function not  gettiing output in usercontrol.

    <%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>     
        <umb:cssInclude ID="CssInclude2" runat="server" FilePath="~/Css/jquery-ui-timepicker-addon.css"   />
    <umb:CssInclude ID="CssInclude1" runat="server" FilePath="~/Css/jquery-ui.css"  />
       <umb:JsInclude ID="JsInclude1" runat="server" FilePath="~/Js/jquery-1.9.1.js" Priority="1"  />
       <umb:JsInclude ID="JsInclude4" runat="server" FilePath="~/Js/jquery-ui.js" Priority="2"  />
       <umb:JsInclude ID="JsInclude2" runat="server" FilePath="~/Js/jquery-ui-sliderAccess.js"  Priority="3"  />
       <umb:JsInclude ID="JsInclude3" runat="server" FilePath="~/Js/jquery-ui-timepicker-addon.js"  Priority="4" />
      
        <script type="text/javascript">
            $(function () {
                $('#txt').timepicker();         
            }); 
        </script>
       
       <asp:TextBox runat="server" ID="txt"></asp:TextBox>
  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 26, 2013 @ 12:27
    Dave Woestenborghs
    0

    Hi,

    Did you check point 2 of my previous post ? Or have you tried including the javascript and css without the use of the client dependency framework ?

  • siva kumar 120 posts 209 karma points
    Apr 26, 2013 @ 13:11
    siva kumar
    0

    yeah tried .but in template also it is showing error.

    in usercontrol "clientdependecy exitsmore than once" error coming

     

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 26, 2013 @ 13:18
    Dave Woestenborghs
    0

    Can you post the template and the usercontrol code again like you have it now ?

  • siva kumar 120 posts 209 karma points
    Apr 26, 2013 @ 13:48
    siva kumar
    0

     this is the usercontrol 

     

    <%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
       <umb:ClientDependencyLoader runat="server" ID="ClientDependencyLoader">
            <umb:CssInclude ID="CssInclude2" runat="server" FilePath="~/Css/jquery-ui-timepicker-addon.css"   />
    <umb:CssInclude ID="CssInclude1" runat="server" FilePath="~/Css/jquery-ui.css"  />
       <umb:JsInclude ID="JsInclude1" runat="server" FilePath="~/Js/jquery-1.9.1.js" Priority="1"  />
       <umb:JsInclude ID="JsInclude4" runat="server" FilePath="~/Js/jquery-ui.js" Priority="2"  />
       <umb:JsInclude ID="JsInclude2" runat="server" FilePath="~/Js/jquery-ui-sliderAccess.js"  Priority="3"  />
       <umb:JsInclude ID="JsInclude3" runat="server" FilePath="~/Js/jquery-ui-timepicker-addon.js"  Priority="4" />
      </umb:ClientDependencyLoader>
     
        <script type="text/javascript">
            $(function () {
                $('#test').timepicker();
            });
        </script>
     
        <div id="test">
       <asp:TextBox runat="server" ID="txt"></asp:TextBox></div>

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 26, 2013 @ 13:49
    Dave Woestenborghs
    0

    I need the template too 

  • siva kumar 120 posts 209 karma points
    Apr 26, 2013 @ 13:54
    siva kumar
    0

    <cd:ClientDependencyLoader ID="ClientDependencLoader" runat="server">
     <link rel="stylesheet" href="/css/jquery-ui.css" />
        <link rel="stylesheet" href="/css/jquery-ui-timepicker-addon.css"  />
    <script src="/scripts/jquery-1.9.1.js" type="text/javascript"></script>
    <script src="/scripts/jquery-ui.js" type="text/javascript"></script>
        <script src="/scripts/jquery-ui-sliderAccess.js" type="text/javascript"></script>
        <script src="/scripts/jquery-ui-timepicker-addon.js" type="text/javascript"></script>
     
        </cd:ClientDependencyLoader>
        <script type="text/javascript">
                       $(function () {
            $('#ContentPlaceHolderDefault_l2').timepicker();
        });
        </script>

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    Apr 26, 2013 @ 14:30
    Dave Woestenborghs
    0

    I see several problems now.

    1. In your template you already have the scripts referecend. But you have them enclosed in the ClientDependencyLoader. This will not work
    2. In your usercontrol you reference your scripts with clientdependency, but with a different path (JS folder). Scripts in umbraco are usually placed in the scripts folder. Also are they enclosed in the clientdependency loader which is wrong
    3. I don't see where you use your usercontrol in your template. It's not referenced directyly or as a macro.

    I think this code should help you :

    Template :

    <cd:ClientDependencyLoader ID="ClientDependencLoader" runat="server"></cd:ClientDependencyLoader>
    <umb:CssInclude ID="CssInclude2" runat="server" FilePath="~/Css/jquery-ui-timepicker-addon.css"   />
    <umb:CssInclude ID="CssInclude1" runat="server" FilePath="~/Css/jquery-ui.css"  />
    <umb:JsInclude ID="JsInclude1" runat="server" FilePath="~/scripts/jquery-1.9.1.js" Priority="1"  />
    <umb:JsInclude ID="JsInclude4" runat="server" FilePath="~/scripts/jquery-ui.js" Priority="2"  />
    <umb:JsInclude ID="JsInclude2" runat="server" FilePath="~/scripts/jquery-ui-sliderAccess.js"  Priority="3"  />
    <umb:JsInclude ID="JsInclude3" runat="server" FilePath="~/scripts/jquery-ui-timepicker-addon.js"  Priority="4" />
    
    <!-- Add your usercontrol or macro here -->

    Usercontrol : 

    <script type="text/javascript">
            $(function () {
                $('#txt').timepicker();
            }); 
        </script> 
    
        <div id="test">
     <asp:TextBox runat="server" ID="txt" ClientIDMode="Static"></asp:TextBox></div>

     

    Dave

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    May 01, 2013 @ 10:14
    Dave Woestenborghs
    0

    Hi Siva,

    Did you manage to get it working ?

    Dave

  • siva kumar 120 posts 209 karma points
    May 01, 2013 @ 10:43
    siva kumar
    100

    yes i managed now working

    thank you for your help

    one more thing i want to ask you

    i want to create one of the  pdf  pages as a  thumbnail  for pdf ?how ?

  • Dave Woestenborghs 3504 posts 12135 karma points MVP 9x admin c-trib
    May 01, 2013 @ 10:45
    Dave Woestenborghs
    0
  • siva kumar 120 posts 209 karma points
    May 01, 2013 @ 10:50
    siva kumar
    0

    i added that control to a docuemnt type "test" .that document type contains default  date picker.the control (timepicker) working but  default datepicker  is not working?what is the problem?

Please Sign in or register to post replies

Write your reply to:

Draft