RadWindow IFrame break out

2 posts, 0 answers
  1. David
    David avatar
    18 posts
    Member since:
    Jun 2010

    Posted 22 Dec 2010 Link to this post


    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

  2. Georgi Tunev
    Georgi Tunev avatar
    7207 posts

    Posted 23 Dec 2010 Link to this post

    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.
Back to Top