faqts : Computers : Programming : Languages : JavaScript : Frames

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

258 of 322 people (80%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

Why do I get "access denied"-error in IE when calling a function in another frame?

Mar 17th, 2000 09:26
James D. Albert, Martin Honnen, Flemming V. Larsen,


You can't access documents on another server than the frame that the 
script is in. So while a frame on
  host1.domain.tld
can call a function in another frame on
  host1.domain.tld
you can't call functions in another frame on
  host2.domain.tld
or even a frame in another domain e.g.
  host.domain2.tld
~ ~ ~
Actually, for version 4 and higher of IE and Netscape it *is* possible 
for host1.domain.tld to access script elements from host2.domain.tld, 
as long as pages on both host1 and host2 include the statement
document.domain = 'domain.tld';
A caveat, however, this is broken for Netscape 4.03 and 4.04.