Permission Denied IE iFrame

▼魔方 西西 提交于 2019-11-28 01:21:41

If both the pages are under your control (i.e. they belong to you and you cn alter the code), try this -

http://www.tomhoppe.com/index.php/2008/03/cross-sub-domain-javascript-ajax-iframe-etc/

Set document.domain like this:

<script type="text/javascript">
document.domain = 'tomhoppe.com';
</script> 

IFrames can communicate as long as they are "of the same origin" - so same domain and same protocol. Communication is blocked if they are of different origin.

HTML5 introduces a new communication mechanism. It may be worth looking at http://www.w3.org/TR/webmessaging/

http://en.wikipedia.org/wiki/Cross-document_messaging

It is also worth reading up on the security implications

https://www.owasp.org/index.php/HTML5_Security_Cheat_Sheet#Web_Messaging

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!