Click here to Skip to main content
16,016,773 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

From one site i am loading an aspx page as a popover through IFrame while Page_Load. Here, IFrame is in one site say www.test.com.

But IFrame src=http://DIfferentDomain/PopOver.aspx. Both are from different domains. But i need to close that IFrame

from PopOver.aspx when click on Button which is in PopOver.aspx.

I have a script plugin in www.test.com in that script i have a fuction like

JavaScript
divClose.onclick=

function(){

document.body.removeChild(document.getElementById(

"divOuterMain"));

document.body.removeChild(document.getElementById(

"layer"));

};


Here "divClose" is image at www.test.com. I need to access that function from PopOver.aspx.

If both Domains are same this script is working fine. But if in case of different domain it is not working.

please any body help me ....
Posted
Updated 18-Apr-12 6:58am
v2

1 solution

IE, and I believe other browsers, have security settings to restrict cross domain access. You can't get around that through your code. You'll have to make changes to the users browser settings.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900