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

to target opener?

1 Answer 64 Views
Window
This is a migrated thread and some comments may be shown as answers.
Per Holmqvist
Top achievements
Rank 2
Per Holmqvist asked on 30 Dec 2007, 02:09 AM
If I have a page and popup a RadWindow.
This RadWindow have a repeater with links.
How do I set the links to target my opener page, not my radwindow?
At the same time I want the radwindow to be closed.

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 02 Jan 2008, 11:38 AM
Hi Per Holmqvist,

You can do this by setting the link to be opened in a function defined in the onclick property:

<script type="text/javascript">  
    function GetRadWindow()  
    {  
        var oWindow = null;  
        if (window.radWindow) oWindow = window.radWindow;  
        else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;  
        return oWindow;  
    }      
      
    function navigateAndClose()  
    {  
        GetRadWindow().BrowserWindow.location.href="http://www.google.com";  
    }  
</script> 
<href="#" onclick="navigateAndClose(); return false;">Navigate to google</a> 

When you navigate the parent page away from the page from which the RadWindow was called, the RadWindow will be destroyed as well.



Greetings,
Georgi Tunev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Window
Asked by
Per Holmqvist
Top achievements
Rank 2
Answers by
Georgi Tunev
Telerik team
Share this question
or