This is a migrated thread and some comments may be shown as answers.

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

2 Answers 83 Views
Window
This is a migrated thread and some comments may be shown as answers.
TM
Top achievements
Rank 1
TM asked on 31 Jan 2014, 09:50 AM



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 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 31 Jan 2014, 11:40 PM
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!
0
TM
Top achievements
Rank 1
answered on 01 Feb 2014, 06:38 AM
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>
Tags
Window
Asked by
TM
Top achievements
Rank 1
Answers by
Dimo
Telerik team
TM
Top achievements
Rank 1
Share this question
or