$("#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
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
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>
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