Forum Moderators: open

Message Too Old, No Replies

"Access is denied"

         

adni18

3:00 pm on Nov 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi. I have an inline frame (I have tried this with regular frames, too) and I can access its window.frames[0] attribute, but when I go further than that, I get an error message: "Access is denied". I can't get the location, functions contained within, or the DOM. Please help.

StupidScript

11:27 pm on Nov 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You're describing a security issue that occurs when the frame you are trying to get info from is not in your domain.

i.e.
mydomain.com => myframes.html
frame1 => myheader.html
frame2 => [yahoo.com...]

In the above example, you would be restricted by Javascript security from accessing the info you mention, and most other info about the contents of frame2, as well. This is to keep webmasters from making sites that track users once they elect to leave the site.

It's a good thing. :)