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

Modal Window iframe cross domain issue

3 Answers 444 Views
Window
This is a migrated thread and some comments may be shown as answers.
Ken
Top achievements
Rank 1
Ken asked on 29 Jul 2009, 06:09 PM
Script Access Denied "Telerik.Web.UI.WebResource.axd"
http://demos.telerik.com/aspnet-ajax/window/examples/dialogreturnvalue/defaultcs.aspx

I have a link on my Main Page that opens a modal window (dialog 1) providing search ability to look up customer information and select them to use on the main page or create a new customer by clicking on a link with in (dialog 1) to popup another modal window (dialog 2) to create new customer.  (Dialog 2) goes to another domain website within our corporate network to setup that customer, when (dialog 2) comes up i get script errors listed above.  I believe this is due to a security browser limitation for iframe cross domain access.

On (dialog 2) all I want is to create a new customer, close (dialog 2) and refresh (dialog 1).  Does anybody have any suggestions?

function GetRadWindow() { 
                var oWindow = null
                if (window.radWindow) oWindow = window.radWindow; 
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; 
                return oWindow; 
            } 
            function CloseRW() { 
                //get a reference to the current RadWindow 
                var oWnd = GetRadWindow(); 
                oWnd.close(); 
            } 
            function openWin2() { 
                var parentPage = GetRadWindow().BrowserWindow; 
                var parentRadWindowManager = parentPage.GetRadWindowManager(); 
                var oWnd2 = parentRadWindowManager.open("http://new domain server/appname/modal/Customer.aspx""r2"); 
                oWnd2.setSize(760, 550); 
                oWnd2.center(); 
                window.setTimeout(function() { 
                    oWnd2.setActive(true); 
                }, 0); 
            } 
Thanks, Bill


3 Answers, 1 is accepted

Sort by
0
Accepted
Martin
Telerik team
answered on 30 Jul 2009, 04:56 AM
Hi Bill,

You are correct, this due to a security browser limitation for iframe cross domain access, and there are no solutions for this.

Regards,
Martin Ivanov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Abhishek
Top achievements
Rank 1
answered on 07 Dec 2014, 06:58 AM
I am facing cross domain issue with close button of model popup , i have write below code for close the popup windows-

     function GetRadWindow() {<br>
            var oWindow = null;<br>
            if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog<br>
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)<br>
<br>
            return oWindow;<br>
        }<br>
<br>
 function ClosePopup() {<br>
            GetRadWindow().close();<br>
        }



when click on close button i got a error "Access denied" in IE9 and IE10 but in IE11 and firefox and chrome working fine.

Can any one help me out for this issue. ? Please Replay ASAP



0
Ianko
Telerik team
answered on 10 Dec 2014, 02:55 PM
Hi Abhishek,

As Martin has stated, if this is an iframe-related issue about cross domain, this is a browser security matter that cannot be resolved.

If this is not the case, please provide more details what exactly is the implementation that causes you difficulties. Note that the information provided does not include details about the logic invoked on RadWindow closing.

Regards,
Ianko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Window
Asked by
Ken
Top achievements
Rank 1
Answers by
Martin
Telerik team
Abhishek
Top achievements
Rank 1
Ianko
Telerik team
Share this question
or