Hello,
I would like to know if window content can close the window?
Here's my code so far:
Unfortonately, the following error is raised when trying to close the window:
Unable to get value of the property 'close': object is null or undefined
I would also like to know if there is a solution that would also work with external content?
Ex:
... where myExternalContent.aspx would be able to access myWindow and close it even if it's not in the same page.
Best regards,
Simon
I would like to know if window content can close the window?
Here's my code so far:
<div id="myWindow"> <button onclick="CloseWindow()" >Close Me</button> <script type=text/javascript> function CloseWindow() { try { var kendoWindow = $("#myWindow").data("kendoWindow").close(); } catch (err) { //Unable to get value of the property 'close': object is null or undefined alert("Error \n\n" + err.message); } } </script></div><script> $(document).ready(function () { var myWindow = $("#myWindow").kendoWindow({ width: "300px", height: "200px", title: "Login", modal: false }); });</script>Unfortonately, the following error is raised when trying to close the window:
Unable to get value of the property 'close': object is null or undefined
I would also like to know if there is a solution that would also work with external content?
Ex:
var myWindow = $("#myWindow").kendoWindow({ width: "300px", height: "200px", title: "Login", modal: false, content: "myExternalContent.aspx"});... where myExternalContent.aspx would be able to access myWindow and close it even if it's not in the same page.
Best regards,
Simon
