I am currently using ASP.NET AJAX v.2010.1.519.35.
I have a parent page using a RadWindowManager which has an onbeforeunload handler to help prevent users from closing windows while there is unsaved data. The parent page dynamically opens any number of pages in a RadWindow. When I minimize then restore the RadWindow, the onbeforeunload handler on the parent is called. Subsequent minimize/restore/maximize also trigger the handler. Note, this only seems to happen in Internet Explorer (I tested in IE 8).
Here's the parent:
The content of the window is irrelevant. In my test project, i just have a simple ASPX that just says "Window". You can create a new Telerik Web project and paste that into Default.aspx, then add a Window.aspx
So, obviously I want to avoid the parent's onbeforeclose handler from being called. I can send a test project, if necessary.
I have a parent page using a RadWindowManager which has an onbeforeunload handler to help prevent users from closing windows while there is unsaved data. The parent page dynamically opens any number of pages in a RadWindow. When I minimize then restore the RadWindow, the onbeforeunload handler on the parent is called. Subsequent minimize/restore/maximize also trigger the handler. Note, this only seems to happen in Internet Explorer (I tested in IE 8).
Here's the parent:
<telerik:RadWindowManager ID="WindowManager" runat="server"> </telerik:RadWindowManager> <div> <a href="#" class="test-dynamic">Test Dynamic</a> </div> <script type="text/javascript"> window.onbeforeunload = function() { return 'Test'; } $('a.test-dynamic').click(function(e) { var mgr = GetRadWindowManager(); var win = mgr.open(null, null); win.setSize(700,700); win.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Resize + Telerik.Web.UI.WindowBehaviors.Maximize + Telerik.Web.UI.WindowBehaviors.Minimize); win.setUrl('Window.aspx'); win.setActive(true); return false; }); </script>The content of the window is irrelevant. In my test project, i just have a simple ASPX that just says "Window". You can create a new Telerik Web project and paste that into Default.aspx, then add a Window.aspx
So, obviously I want to avoid the parent's onbeforeclose handler from being called. I can send a test project, if necessary.