VisibleOnPageLoad only works once?

4 posts, 0 answers
  1. Blasty
    Blasty avatar
    15 posts
    Member since:
    Feb 2009

    Posted 03 Aug 2009 Link to this post

    Ok, so I have a page that sets visibleonpageload for a radwindow to true in the codebehind after a button click.

    This works fine so long as the window is closed by the exit button in the top right.

    But if I close the window by using the client side functionality   like this.

            function GetRadWindow() {  
                var oWindow = null;  
                if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog  
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz az well)  
                return oWindow;  
            }  
            function returnArg(arg) {  
                var oWnd = GetRadWindow();  
                if (oWnd) {  
                    oWnd.close(arg);  
                }  
                else {  
                    alert('oWnD Null');  
                }  
            }  
                


    after this I can't get the visibleonpageload = true to work.  the page reloads on button click, but doesn't show the window.

  2. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7206 posts
    Member since:
    Dec 2014

    Posted 04 Aug 2009 Link to this post

    Hi Blasty,

    Please provide more details about your exact setup. What is your RadWindowManager / RadWindow declaration and how exactly do you open the RadWindow control. I am asking you this because the code that you posted is fine and should not raise such problem. The reason for this behavior is somewhere else, but without having a better look over your case I cannot be of much help.



    Best wishes,
    Georgi Tunev
    the Telerik team


    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.

  3. Blasty
    Blasty avatar
    15 posts
    Member since:
    Feb 2009

    Posted 04 Aug 2009 Link to this post

    Here is the codebehind

            /// <summary>  
            /// Sets the radwindow navigateurl and pageload visibility.  
            /// </summary>  
            /// <param name="processorResponse">The processor response.</param>  
            private void SetSecure3D(ProcessorResponse processorResponse)  
            {  
                winVerify3D.NavigateUrl = "Secure3d.aspx;
                winVerify3D.ShowContentDuringLoad = true;
                winVerify3D.VisibleOnPageLoad = true;
                ShowResults("Display 3D Secure Transfer Window." );  
     
            } 

    The showresults method was merely a method that shows a message in a asp label control on the page.  just there to help me make sure that those lines of code are being hit and they are everytime.

                               <telerik:RadWindow ID="winVerify3D" VisibleOnPageLoad="false" runat="server" Animation="Fade" Modal="True" 
                                    Title="Verify Secure3D"  Width="600" Height="500" OnClientClose="GetPaResOnClientClose" 
                                    ShowContentDuringLoad="false">  
                                </telerik:RadWindow>   

    Above is my radwindow declaration, you can see it has an onclientclose event, provided here.

            function GetPaResOnClientClose(sender, eventArgs) {  
                var arg = eventArgs.get_argument();  
                if (arg) {  
                    var txPaRes = document.getElementById("txtPaRes")  
                    if (txPaRes) {  
                        txPaRes.value = arg;  
                      InitiateAjaxRequest('None');  
                    }  
                }  
            } 

    everything works fine in regards to first time through, but if I click my button again, it fires my codebehind, put the radwindow isn't visible on pageload.

  4. Blasty
    Blasty avatar
    15 posts
    Member since:
    Feb 2009

    Posted 04 Aug 2009 Link to this post

    I believe I managed to fix my problem by going to this thread here

    http://www.telerik.com/community/forums/aspnet-ajax/window/open-radwindow-server-side-fires-only-once.aspx

    I was using a radajaxmanager, and even though I thought I configured it correctly, I guess I didn't.  Specifically in  my case I needed the radajaxmanager to have the main submit button listed as a control that causes requests, and the radwindowsmanager had to be listed as one of the controls it updates.

Back to Top