I have a menu bar with an option that I want to open in a window. The contents of the window is dynamic and needs to be refreshed each time I open the window.
The first time I click on the option the window opens correctly, and when I click on the "close" icon, the window closes as expected.
The second time I click on the option, the window does not open. I suspect it has something to do with the state of the window.
Listed below is my code that I use to open the window:
<script type="text/javascript">
$(document).ready(function () {
$(".menu-dialog").click(function () {
var href = $(this).attr("href");
var title = $(this).attr("title");
var myWin = $("#anchor").kendoWindow({
width: "auto",
height: "auto",
modal: false,
resizable: true,
title: title,
content: href
});
return false;
});
});
</script>
<body>
<div class="main">
<div id="anchor"></div>
<asp:ContentPlaceHolder ID="MainContent" runat="server"/>
</div>
<div class="clear" />
<div class="footer" />
</body>