I'm trying to resolve a client-side issue that has me scratching my head. What happens is, on my form, I click a button to open a window, and I get the dreaded "TypeError: kendoWindow is not a function" error.
There are a few things I should mention about this environment before I post my code:
PARENT XSLT:
//This is contained within $(document).ready(function()
var window = $("#Sponsor").kendoWindow({
height: "100px",
modal: true,
title: "Choose Sponsor",
visible: false,
width: "500px"
}).data("kendoWindow");
HIDDEN XSLT (this is contained in an XSL:OnClick attribute):
var window = $('#Sponsor').data('kendoWindow');window.center();window.open();
Realizing that using "window" as a variable could potentially be an issue, I changed it to look like this:
PARENT:
var kSponWin= $("#Sponsor");
if (!kSponWin.data("kendoWindow")) {
kSponWin.kendoWindow({
height: "100px",
modal: true,
title: "Choose Sponsor",
visible: false,
width: "500px"
}).data("kendoWindow");
}
HIDDEN:
kSponWin.center().open();
Nothin' doin'. The only difference is now my error says "kSponWin.kendoWindow" instead of "window.kendoWindow is not a function."
So does anyone have any idea as to what I should do? This problem is keeping me from testing.
Thanks in advance . . .
I figured out my problem.
I went to Telerik's web site and found this: JavaScript error that Kendo widgets are unavailable or undefined.
So, I looked to see if there was more than one reference to jQuery. Sure enough, I found one. I removed it, and lo and behold, my code started working again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With