From: Doug M. <do...@cr...> - 2002-12-16 02:21:13
|
Actually, the last product I worked on had fraems all over the place. To make things jive, we simply added document.domain = "www.netpcs.com" at the top of each frame. This will fool most versions of IE into thinking that both documents are indeed from the same domain. I do not know of that still will work for the newest browsers. ----- Original Message ----- From: "Raymond Irving" <xw...@ya...> To: <dyn...@li...>; <dyn...@li...> Sent: Sunday, December 15, 2002 9:54 AM Subject: [Dynapi-Dev] IFRAME cross-domain security permissions > 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 > > > ------------------------------------------------------- > This sf.net email is sponsored by: > With Great Power, Comes Great Responsibility > Learn to use your power at OSDN's High Performance Computing Channel > http://hpc.devchannel.org/ > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://www.mail-archive.com/dyn...@li.../ > > |