This is a migrated thread and some comments may be shown as answers.

RadWinow Pops up again unrequested

4 Answers 47 Views
Window
This is a migrated thread and some comments may be shown as answers.
Revital Keren
Top achievements
Rank 1
Revital Keren asked on 16 Jun 2009, 01:52 PM
Hi,
I have an aspx with a submit button which open a radWindow on click (server side) using the following lines:

 

InfoWind.NavigateUrl = "../Meida/InfoContent.aspx + dataObj.ToString();  
InfoWind.VisibleOnPageLoad = true 


where InfoWind is the RadWindow.
In the page that pops up in the window there is a button which closes the window on click calling the following javascript function:

            function WindowClose()  
            {  
                var oWindow = null;  
                if (window.radWindow)   
                    oWindow = window.radWindow;  
                else   
                    if (window.frameElement.radWindow)   
                        oWindow = window.frameElement.radWindow;  
                oWindow.close();  
            } 

the code works fine and then the user gets the main window again.
on that screen there is also a HyperLink control which navigates to a classic asp page which I don't have control over.
My problem is on this scenario:

  1. the user open the pop up mentioned above by using a submit button
  2. then uses the WindowClose to close the pop up and return to the main window
  3. clicks the HyperLink on the main Window and gets transffered to an asp page.
  4. clicks the browser's Back button to go back to the original main window

 

in this case the excpected behavior is to get the main window, but what actually happens is that the main window is displayed and right after  that the pop up opens up again...

Here is the RadWindow and RadWindowManager definitions on the main page:

<telerik:RadWindowManager  
     EnableEmbeddedSkins="False" KeepInScreenBounds="True" DestroyOnClose="True" 
       Behaviors="Close"  Skin="ReformaSkin"   
        VisibleStatusbar="False"  ID="windowManager"  runat="server" Behavior="Close"   
        InitialBehavior="Maximize"   
        Left="" style="display: none;"  Top="">  
            <windows> 
                <telerik:RadWindow ID="InfoWind" runat="server" Behaviors="Close, Maximize"   
                    DestroyOnClose="true" EnableEmbeddedSkins="False"   
                    InitialBehavior="Close, Maximize" Left="" NavigateUrl="" Skin="ReformaSkin"   
                    style="display:none;" Modal="false" Top="" RestrictionZoneID="frnHotz"  > 
                </telerik:RadWindow> 
            </windows> 
    </telerik:RadWindowManager> 


Please tell me what am I doing wrong?

Thanx,
Revital

4 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 17 Jun 2009, 11:24 AM
Hello Revital,

This behavior is expected and is not related to the RadWindow control, but is a general programming issue. Note that you will face the same task if you are not opening a RadWindow but for example set a text to a Label control.
My suggestion is to either open the RadWindow on the client or implement a custom logic that will set this property to false when needed.


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.
0
Revital Keren
Top achievements
Rank 1
answered on 17 Jun 2009, 12:29 PM
The problem is that I have to open the pop up from the server side because I don't have all the information needed (Data wise) on the client side.
Therefore openning the window from the client side is not an option...

Changing the VisibleOnPageLoad  property to false sounds like the right solution, only problem is that I never get back again to the server side between closing the child, navigation to a different page or navigation back to the parent window  (as I understand it there is no way for me to do it from the client like in an OnClientClose event or something).

Do you have any other suggestions for me?
0
Accepted
Georgi Tunev
Telerik team
answered on 18 Jun 2009, 11:36 AM
Hi Revital,

Yes - when you get to the original page by using the Back button, the browser will load a cached version of the page - it does not load it again from the server. As I noted in my previous reply, this issue is not related to a specific RadControl but is a general one.
The only other suggestion that I can give in your scenario is to use Ajax to open the RadWindow - for example you could wrap the control in an update panel or use RadAjax for that purpose. For convenience I attached a small sample page to this thread that shows what I am talking about.


Regards,
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.
0
Revital Keren
Top achievements
Rank 1
answered on 21 Jun 2009, 09:28 AM
Hi Georgi
Putting the Button inside the UpdatePanel with the RadWindow did the trick!!!

Thanks a lot,
Revital



Tags
Window
Asked by
Revital Keren
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Revital Keren
Top achievements
Rank 1
Share this question
or