Unable to close window from its content in Kendo Window

gznwow

New Member
According to this page, all I have to do is call the following code from the content of the window since I am not using iframe:$(buttonInsideWindow).closest(".k-window-content").data("kendoWindow").close();It doesn't work. When I try to close this manually from the console, it returns a null when you try to retrieve the kendoWindow. (That is, it returns the correct div when $(buttonInsideWindow).closest(".k-window-content") is invoked but the .data("kendoWindow") on it returns null). I am using a custom button inside the window content which calls the close event manually. This is how I invoke the window in the first place:\[code\]function otherCusLogInWindow_Open() { var otherCusLogInWindow = $("#otherCusLogInWindow"); otherCusLogInWindow.kendoWindow({ width: "535px", height: "850px", title: "ASDF", modal: true, actions: ["Minimize", "Maximize", "Close"], content: "otherCusLogIn.jsp", iframe: false, visible: false, draggable: true, resizable: true }).data("kendoWindow").center().open();}\[/code\]And inside the window content, close event is trivial:\[code\]function closeWindow(parentFuncCall) { $("#otherCusLogInWindow").closest(".k-window-content").data("kendoWindow").close();}\[/code\]Just to get this out of the way, I am not able to use iframe for other reasons. I need to get this to work in its current state.How can I solve the issue?
 
Back
Top