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

Custom close and refresh parent

1 Answer 15 Views
Window
This is a migrated thread and some comments may be shown as answers.
Developer
Top achievements
Rank 1
Developer asked on 29 Jul 2015, 11:13 AM
Hello,
I would like to accomplish the following.  I have page, on this page the user can open a radwindow.  If they click the default close button the radwindow it just closes and that is fine, however I have another button within the radwindow.
If that button is clicked I would like the radwindow to close and the parent page to undergo a refresh.
The only examples I have found refresh the page each time the radwindow is closed which is not what I’m looking for.

Any help appreciated.

1 Answer, 1 is accepted

Sort by
0
Danail Vasilev
Telerik team
answered on 31 Jul 2015, 10:10 AM
Hello,

If you want to reference the window object from inside its context in order to close it you can use the code below to get initially the window object and then utilize its client-side API (i.e., the close() method). For example:

function GetRadWindow() {

           var oWindow = null;

           if (window.radWindow) oWindow = window.radWindow;

           else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;

           return oWindow;

       }


More information on the matter is available in the following resources:




Regards,
Danail Vasilev
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Window
Asked by
Developer
Top achievements
Rank 1
Answers by
Danail Vasilev
Telerik team
Share this question
or