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

radwindow

1 Answer 47 Views
Window
This is a migrated thread and some comments may be shown as answers.
appdev
Top achievements
Rank 1
appdev asked on 20 May 2009, 09:50 PM
when i go to my default.aspx page and click on a button, it will open a radwindow which open a radwindow with a getdata.aspx page inside that radwindow. how do i close this radwindow by clicking on an asp button to get back to the main window. please help. thanks.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 21 May 2009, 05:54 AM
Hi Duy,

Add the following client side code for closing the currently opened window.

getdata.aspx:
 
<asp:Button ID="Button2" runat="server" Text="Close Window" OnClientClick="CloseWindow(); return false;" /> 
 
<script type="text/javascript">  
function CloseWindow()  
{  
    var oWindow = GetRadWindow();   //Get reference to radwindow  
    oWindow.Close();  
}  
function GetRadWindow()  
{  
   var oWindow = null;  
   if (window.radWindow) oWindow = window.radWindow;  
   else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;  
   return oWindow;  
}  
</script> 
You can find out more information about GetRadWindow() and important RadWindow methods by going through the following links.
RadWindow Methods
Opening a RadWindow from Within a RadWindow

Thanks,
Princy.
Tags
Window
Asked by
appdev
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or