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

RadWindow IFrame break out

1 Answer 75 Views
Window
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 22 Dec 2010, 12:05 PM
Hi,

I wonder if there is anyone who knows how to detect an IFrame breakout condition.

Under the example http://demos.telerik.com/aspnet-ajax/window/examples/default/defaultcs.aspx :

If one selects 'Open New Window' with a URL that has IFRAME breakout detection then the site opens in the main window instead of the newly created RadWindow. I understand there isn't really a way to prevent this however I'm wondering if there's a way to detect it and prevent the main page loading this URL. I would prefer an alert message that tells the user one will navigate away from the page.

The javascript below is not the ideal solution as this confirmation is called on every page refresh, back button etc.
window.onbeforeunload = function () {
       return "This will take you away?";
}

An example of a site with IFRAME breakout detection is  www.k1664.com



Thanks

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 23 Dec 2010, 10:21 AM
Hi David,

I might be wrong of course, but I don't think this is possible - you cannot control when / should the page be redirected to another location. Indeed, the only way is to use onunload but as you noticed, the event is fired on every reload.


Best wishes,
Georgi Tunev
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Window
Asked by
David
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or