D
Dave
Hi all,
I write this javascript code in a html page:
function inscript()
{
var frame = document.getElementById("myframe");
frame.contentWindow.document.createElement('script');
scr.type = 'text/javascript';
scr.text = 'alert("hello")';
frame.contentWindow.document.body.appendChild(scr);
}
In the same page there is a IFRAME that invoke the javascript code:
<iframe src="http://www.google.it" frameborder="0" align="top"
width="100%" height="100%" id="myframe" onload="inscript()">
Loading this page, Internet Explorer generates an error Message:
"Access Denied", because
the javascript try to mod the DOM of a web page with another domain
(www.google.it).
This problem can be solved in Mozilla Firefox adding this
instruction:
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
in javascript code.
Please help me find a solution for IE.
Thank You
I write this javascript code in a html page:
function inscript()
{
var frame = document.getElementById("myframe");
frame.contentWindow.document.createElement('script');
scr.type = 'text/javascript';
scr.text = 'alert("hello")';
frame.contentWindow.document.body.appendChild(scr);
}
In the same page there is a IFRAME that invoke the javascript code:
<iframe src="http://www.google.it" frameborder="0" align="top"
width="100%" height="100%" id="myframe" onload="inscript()">
Loading this page, Internet Explorer generates an error Message:
"Access Denied", because
the javascript try to mod the DOM of a web page with another domain
(www.google.it).
This problem can be solved in Mozilla Firefox adding this
instruction:
netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
in javascript code.
Please help me find a solution for IE.
Thank You