RadWindow Opens and then immediately closes.

3 posts, 1 answers
  1. Phil
    Phil avatar
    273 posts
    Member since:
    Jul 2008

    Posted 27 Dec 2010 Link to this post


    I am trying to lauch a window like I have done many times before and the window immediately closes.

    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
        <script type="text/javascript">
            function orderMaintenanceOpenWindow() {
                var ordNbr = document.getElementById("<%= orderNumberTextBox.ClientID %>").value;
                if (ordNbr == "") {
                else {
                    var winurl = "OrdersMaintenance.aspx?ordernbr=" + ordNbr;
                    // alert(winurl);
                    var oWnd = radopen(winurl, "orderMaintenanceWindow");
                return false;
    <telerik:RadWindowManager ID="ordersSelectionRadWindowManager" runat="server" EnableViewState="True">
            <telerik:RadWindow ID="orderMaintenanceWindow" runat="server"
                Height="600" Width="800" Title="Order Maintenance"
                KeepInScreenBounds="True" VisibleTitlebar="true" Modal="true"
                Behaviors="Close, Maximize, Move, Resize" InitialBehaviors="Maximize" />
    I see the window fully populated and it just closes.
    Any suggestions?
  2. Answer
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 28 Dec 2010 Link to this post

    Hello Phil,

    I am not sure about how you are calling the function "orderMaintenanceOpenWindow" to open window. This behavior can happen if there is a postback taking place after window is opened. Therefore, you need to cancel the postback if any.

    Take an example, if the window is opened on ASP Button-Click, then adding "return false;" will cancel the postback and thereby the window remains on page. 

    <asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="orderMaintenanceOpenWindow(); return false; " />

  3. Phil
    Phil avatar
    273 posts
    Member since:
    Jul 2008

    Posted 28 Dec 2010 Link to this post

    Hi Shinu:

    That solved it.  I am using a Linkbutton and the OnClientClick event.  I just copied the code from a working page, but this time it had this problem.

Back to Top