Uncaught TypeError: Object [object Object] has no method 'kendoWindow'

3 posts, 0 answers
  1. TM
    TM avatar
    2 posts
    Member since:
    Jan 2014

    Posted 31 Jan 2014 Link to this post




    myHead.jsp
    <head>  
        <link rel="stylesheet" type="text/css" href="css/kendo/kendo.common.min.css" />
        <link rel="stylesheet" type="text/css" href="css/kendo/kendo.default.min.css" />
         
        <script type="text/javascript" src="js/jquery-1.11.0.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.10.4.custom.min.js"></script>
         
        <script type="text/javascript" src="js/kendo.all.min.js"></script>
        <script type="text/javascript" src="js/kendo.culture.ja-JP.min.js"></script>
         
        <script type="text/javascript" src="js/myJs.js"></script>
         
        <sj:head jqueryui="true"/>
    </head>


    include.jsp
    1.<div id="example" class="k-content">
    2.    <div id="window">
    3.        WINDOW
    4.    </div>
    5. 
    6.    <span id="undo" style="display:none" class="k-button">Click here to open the window.</span>
    7.</div>


    myJs.js
    $(document).ready(function() {
        var window = $("#window"), undo = $("#undo").bind("click", function() {
            window.data("kendoWindow").open();
            undo.hide();
        });
     
        var onClose = function() {
            undo.show();
        }
     
        if (!window.data("kendoWindow")) {
            window.kendoWindow({
                width : "600px",
                title : "About Alvar Aalto",
                actions : ["Pin", "Minimize", "Maximize", "Close"],
                close : onClose
            });
        }
    });


    Run this page  => Uncaught TypeError: Object [object Object] has no method 'kendoWindow'
    kendo.all.min.js version : v2013.3.1324

    I refferred this troubleshooting, but not solved.
    Whats wrong. please help...
  2. Dimo
    Admin
    Dimo avatar
    8333 posts

    Posted 31 Jan 2014 Link to this post

    Hello Takahiro,

    Either the Kendo UI script is missing (wrong URL?), or there is another jQuery instance registered after Kendo UI.

    Regards,
    Dimo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. TM
    TM avatar
    2 posts
    Member since:
    Jan 2014

    Posted 01 Feb 2014 in reply to Dimo Link to this post

    Hello Dimo.

    I solved the problem, write in one jspfile.

    include.jsp
    <script type="text/javascript" src="js/kendo.all.min.js"></script>    <script type="text/javascript" src="js/kendo.culture.ja-JP.min.js"></script>
     
    <div id="example" class="k-content">
        <div id="window">
            WINDOW
        </div>
     
        <span id="undo" style="display:none" class="k-button">Click here to open the window.</span>
    </div>
     
    <script>
    $(document).ready(function() {
       var window = $("#window"), undo = $("#undo").bind("click", function() {
          window.data("kendoWindow").open();
          undo.hide();
       });
     
       var onClose = function() {
          undo.show();
       }
     
       if (!window.data("kendoWindow")) {
          window.kendoWindow({
              width : "600px",
              title : "About Alvar Aalto",
              actions : ["Pin", "Minimize", "Maximize", "Close"],
              close : onClose
          });
       }
    });
    </script>

    Thanks.
    <<sdiv id="example" class="k-content">
    2.    <div id="window">
    3.        WINDOW
    4.    </div>
    5. 
    6.    <span id="undo" style="display:none" class="k-button">Click here to open the window.</span>
    7.</div>
Back to Top