Hi all,
I have a popup window which loads the content from another source.
The loaded content has a button, which should close the window
What I find is that the close button works once, but if another orderWindow is opened after, the closebutton click event no longer fires.
If I reload the calling page the event will work again (but only once)
I have searched the forums and tried using
$(this).closest(".k-window-content").data("kendoWindow").close();
and changing the click event to an onClick javascript function.
But none of these things seem to help.
Any ideas, suggestions to what I'm missing or doing wrong?
I have a popup window which loads the content from another source.
var kendoOrderWindow = $("<
div
id
=
'orderWindow'
></
div
>").kendoWindow({
title: "Order "+orderIndex,
resizable: false,
modal: true,
width: 1000,
draggable: false,
content: "myURLcontent",
open: function (e) {
this.wrapper.css({ top: 50 });
}
});
kendoOrderWindow.data("kendoWindow")
.center()
.open()
$("#button_close").click(function(e) {
e.preventDefault();
$('#orderWindow').data("kendoWindow").close();
});
If I reload the calling page the event will work again (but only once)
I have searched the forums and tried using
$(this).closest(".k-window-content").data("kendoWindow").close();
and changing the click event to an onClick javascript function.
But none of these things seem to help.
Any ideas, suggestions to what I'm missing or doing wrong?