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

RadWindow not closing

1 Answer 63 Views
Window
This is a migrated thread and some comments may be shown as answers.
Aleksandra
Top achievements
Rank 1
Aleksandra asked on 02 Sep 2008, 08:18 PM

My default.aspx page, which is being opened using the RadWindow control, has a Cancel button which does not work in closing the window. I try the following, amongst many others, which does not work: 

function

Cancel_Clicked()

{

var oWindow = GetRadWindow();

oWindow.close();

}

OR:

function Cancel_Clicked()

{

window.opener = window.radWindow;

window.close();

}

<button onclick="Cancel_Clicked();" class="bButton">Cancel</button>


When I open default.aspx in a separate window, the closing event works with the second Cancel_Clicked() function. But, nothing is successful in closing the default.aspx page when I open it in the RadWindow.

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 03 Sep 2008, 01:41 PM
Hi Aleksandra,

The first function should close the RadWindow (assuming that it is called in the content page and teh GetRadWindow() function exist there as well):

function GetRadWindow() 
  var oWindow = null
  if (window.radWindow) 
     oWindow = window.radWindow; 
  else if (window.frameElement.radWindow) 
     oWindow = window.frameElement.radWindow; 
  return oWindow; 
}   
 
function Cancel_Clicked() 
    var oWindow = GetRadWindow(); 
    oWindow.close(); 
 


If you still experience problems, please open a support ticket and send me a sample project where the problems can be reproduced - I will check it and get back to you with solution right away.


Regards,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Aleksandra
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or