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

Open is undefined on window

3 Answers 99 Views
Window
This is a migrated thread and some comments may be shown as answers.
jeff
Top achievements
Rank 1
jeff asked on 14 Jan 2014, 10:37 PM
I have a div called UserInfo. When a user clicks a button, this div should be the window that pops over. The code to do this is:
$("#AddLegendItem").on("click", function () {
var dialog = $("#UserInfo");
dialog.data("KendoWindow").open();
});
However, it errors out on the second line of the anonymous function saying "unable to get property of 'open' of undefined or null reference.

I've read through the forums and one person had some duplicate code but I do note. I'm not sure where to go at this point. Ideas?

Thanks!

3 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 16 Jan 2014, 08:54 AM
Hello Jeff,

Your code looks fine and I cannot tell you what is the reason for the undefined error. Could you please extract a runnable sample, that we can take a look at and narrow down the issue?

Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Luis Barahona
Top achievements
Rank 1
answered on 23 Feb 2017, 03:30 PM

Hello, I have the an error when I'm trying to open a kendoWindow also I get this error with other control such as kendoComboBox all of them in the same page.
Here is my declaration of the javascript libraries in _Layout.cshtml

<!DOCTYPE html><html lang="en"><head>     <meta charset="utf-8" />     <meta name="viewport" content="width=device-width, initial-scale=1.0">     <link href='http://fonts.googleapis.com/css?family=Roboto+Condensed:300,400' rel='stylesheet' type='text/css'>     <link href='http://fonts.googleapis.com/css?family=Lato:300,400,700,900' rel='stylesheet' type='text/css'>     <!-- CSS Libs -->     <link href="~/Content/css/bootstrap.min.css" rel="stylesheet" />     <link href="~/Content/fontawesome/font-awesome.min.css" rel="stylesheet" />     <link rel="stylesheet" type="text/css" href="~/Scripts/lib/css/animate.min.css">     <link rel="stylesheet" type="text/css" href="~/Scripts/lib/css/bootstrap-switch.min.css">     <link rel="stylesheet" type="text/css" href="~/Scripts/lib/css/checkbox3.min.css">     <link rel="stylesheet" type="text/css" href="~/Scripts/lib/css/jquery.dataTables.min.css">     <link rel="stylesheet" type="text/css" href="~/Scripts/lib/css/dataTables.bootstrap.css">     @*<link rel="stylesheet" type="text/css" href="~/Scripts/lib/css/select2.min.css">*@     <link href="~/Content/kendo/2016.3.1118/kendo.common.min.css" rel="stylesheet" type="text/css" />     <link href="~/Content/kendo/2016.3.1118/kendo.bootstrap.min.css" rel="stylesheet" type="text/css" />     <link rel="stylesheet" type="text/css" href="~/Content/css/style.css">     <link rel="stylesheet" type="text/css" href="~/Content/css/themes/flat-blue.css">     <link rel="stylesheet" type="text/css" href="~/Content/css/site.css" />     <!-- Javascript Libs -->     <script src="~/Scripts/jquery-3.1.1.min.js"></script>     <script src="~/Scripts/bootstrap.min.js"></script>     <script src="~/Scripts/kendo/2016.3.1118/kendo.all.min.js" type="text/javascript"></script>     <script src="~/Scripts/kendo/2016.3.1118/kendo.aspnetmvc.min.js" type="text/javascript"></script>     <script src="~/Scripts/jquery.validate.min.js"></script>     <script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>     @*<script type="text/javascript" src="~/Scripts/lib/js/Chart.min.js"></script>*@     <script type="text/javascript" src="~/Scripts/lib/js/bootstrap-switch.min.js"></script>     <script type="text/javascript" src="~/Scripts/lib/js/jquery.matchHeight-min.js"></script>     <script type="text/javascript" src="~/Scripts/lib/js/jquery.dataTables.min.js"></script>     <script type="text/javascript" src="~/Scripts/lib/js/dataTables.bootstrap.min.js"></script>     @*<script type="text/javascript" src="~/Scripts/lib/js/select2.full.min.js"></script>*@     <script type="text/javascript" src="~/Scripts/lib/js/es6-promise.auto.min.js"></script>     <script type="text/javascript" src="~/Scripts/lib/js/ace/ace.js"></script>     <script type="text/javascript" src="~/Scripts/lib/js/ace/mode-html.js"></script>     <script type="text/javascript" src="~/Scripts/lib/js/ace/theme-github.js"></script>     <script type="text/javascript" src="~/Scripts/moment.min.js"></script>     <title>@ViewBag.Title</title>     @using sml.myportal.web.Helpers </head><body>     <div class="app-container">

    </div>     <script type="text/javascript" src="~/js/app.js"></script></body></html>

 

 

0
Kiril Nikolov
Telerik team
answered on 24 Feb 2017, 08:07 AM
Hi,

Can you please open a separate support request with a runnable sample and we will be happy to help.

Thanks!

Regards,
Kiril Nikolov
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Window
Asked by
jeff
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Luis Barahona
Top achievements
Rank 1
Share this question
or