Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Window > Radwindow titlebar click calls parent page onbeforeunload function
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

Not answered Radwindow titlebar click calls parent page onbeforeunload function

Feed from this thread
  • Shahid avatar

    Posted on Sep 24, 2010 (permalink)

    We have RadWindowManager present in the home page of our application.

    <rad:RadWindowManager ID="RadWindowManager" runat="server" Behavior="default" Height="300px"
                OnClientPageLoad="noScroll" DestroyOnClose="true" PreserveClientState="false"
                ReloadOnShow="true" Width="420px" Left="300" Top="150" InitialBehavior="None"
                VisibleStatusbar="true" Modal="true" SingleNonMinimizedWindow="true" OnClientClose="OnRadWindowClose">
    </rad:RadWindowManager>

    In the body of home page, we have this code
    <body class="nonContentBody" onload="HomeLoaded();" onbeforeunload="AskBeforeCloseWindow()"



    Now from the content page we open the rad window instances as follows:-
    function openRadWindow() {   
        var wnd = window.radopen("Editor.aspx, null);
        return false;
    }


    <asp:ImageButton ID="ibtn1" OnClientClick="openRadWindow()" runat="server">



    The Issue which we are facing is when we click on any item of the title bar of radwindow, The javascript function AskBeforeCloseWindow present on the home page is called.
    For example when we click on the pin in button every thing is as expected. but when we click on pin out, javascript function AskBeforeCloseWindow  is called. We do not want to call this function at the click of any of the item of title bar.
    Is there a way out to avoid calling this function. ?

  • Georgi Tunev Georgi Tunev admin's avatar

    Posted on Sep 29, 2010 (permalink)

    Hello Shahid,

    I tried to reproduce the problem locally, but everything worked as expected. Please open a support ticket and send a sample project that we could examine.


    Kind regards,
    Georgi Tunev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

  • Hendrik avatar

    Posted on May 5, 2011 (permalink)

    Hello Georgi,

    we are recognizing the same problem in one of our projects as well - the onpageunload event is triggered every time the built-in maximize and minimize buttons are pressed...

    We use the 2011_1_315_40 version of the controls and the behavior appears only with IE8 and not with FF 3.x...

    Has a support ticket been opened or do you already a know a solution ??

    Thanks in advance
    Hendrik

  • Georgi Tunev Georgi Tunev admin's avatar

    Posted on May 10, 2011 (permalink)

    Hello Hendrik,

    Yes, we've located the reason for the problem and the good news is that there is an easy solution. Please check this forum thread for more details.


    Regards,
    Georgi Tunev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Window > Radwindow titlebar click calls parent page onbeforeunload function