I have the following HTML markup (don't ask ....)
- document //main site - <iframe> //my site - <iframe> //site within my site - <frame> - <a onclick="JavaScript:parent.parent.location.href='http://bla.com;return false;'">
Basically, the main site calls my site in an iframe. I, in turn, also have an iframe on my site, where I call the third site. The third site has a set of frames with a frame in which there is a link. When clicking on this link, he should change the URL of my site. My site and my sub site are in the same domain. When I launch my site as "standalone" (not in an iframe), the above code works fine in all browsers. As soon as I open my site in the iframe of the main site, it looks like the above code is trying to change the source of the main site. In FireFox I get the console message "Access to property denied". In IE (lol), it opens a new window with my site not on the main site.
What is the correct JavaScript to change the @src attribute on my site when I am in an iframe?
Hope this is not too embarrassing. Thanks!
source share