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

Bust modal pop up out of iFrame

1 Answer 168 Views
Window
This is a migrated thread and some comments may be shown as answers.
Andy Green
Top achievements
Rank 2
Andy Green asked on 17 Jun 2015, 02:20 PM

I have a framed site with an IFrame containing a Radgrid. From the grid I have pop up RadWIndows that pop up in modal form, but they are contained within the iFrame.

Is it possible to bust these modal pop ups over the iframe, the main reason is content and several scroll bars which makes using the pop very difficult with a lot of content.

Andy

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 17 Jun 2015, 02:32 PM

Hi Andy,

You can open the RadWindow from the parent page, in a fashion similar to what is shown in the following articles (but you would probably use window.parent.radopen()). The browser itself will not let you move an HTML element (the RadWindow) from the framed page out of the iframe.

Here is a basic example:

on the framed page:

function openRwOnParent() {
    var wnd = window.parent.radopen("someUrl", "someName");
    wnd.__openerPage = window;
}
 
function handleDataFromWnd(data) {
    alert(data);
}

on the parent page

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" OnClientClose="OnClientClose"></telerik:RadWindowManager>
<iframe src="theFramedPage.aspx"></iframe>
<script>
    function OnClientClose(sender, args) {
        if (sender.__openerPage && sender.__openerPage.handleDataFromWnd) {
            var data = args.get_argument(); //the most common way of getting data from a RW
            sender.__openerPage.handleDataFromWnd(data);
        }
    }
</script>

Regards,

Marin Bratanov
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
Andy Green
Top achievements
Rank 2
Answers by
Marin Bratanov
Telerik team
Share this question
or