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

I want to access For Ex. www.websit1.com from my www.website2.com as a child page in my website2.

Below my code in html page for access website1 in website2

Like:

<html>
<head></head>
<body>
<iframe id="Frame" src="www.website2.com" name="Frame" allowtransparency="true" frameborder="0" style="width:100%;height:500px"></iframe>
</body>
</html>


But i get the error like

Uncaught SecurityError: Blocked a frame with origin "www.website2.com" from accessing a frame with origin "www.website1.com". Protocols, domains, and ports must match.

How can solve this error???

Please share any suggestion or answer.

Thanks,
Posted

1 solution

That is a browser setting so you'll need to make the change to the browser. You can't control it through code.
 
Share this answer
 
Comments
Mayank Engineer 30-Jan-15 8:36am    
How can i set each and every browser ???
ZurdoDev 30-Jan-15 8:55am    
You can't, other than manually, or if it's windows you can use Group Policy. It's a security setting so not one that can just be bypassed easily.

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