From: Raymond I. <xw...@ya...> - 2002-12-15 17:54:54
|
Hello, I'm getting an Permission or Acess Denied error in IE whenever I try to acess the document object of an IFRAME who's location was set to load a page from a different domain. Is there a solution to this problem? Here's a sample page that generates the error in IE: <html> <head> <title>IFRAME cross-domain test</title> <script language="Javascript"> function init(){ var fr=window.frames["ifrm"]; fr.location.href="http://some-other-domain/index.html"; window.setTimeout("testDoc()",2000); } function testDoc(){ var fr=window.frames["ifrm"]; // If I try to access the document object or the location object // I get a Permission or Access denied error var doc=fr.document; alert(doc); } </script> </head> <body onload="init()"> <iframe name="ifrm" src=""></iframe> </body> </html> -- Raymond Irving __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com |