Tuesday, September 13, 2011

Make an iFrame anchor jump parent page?

I've been toying with the idea of creating a site of mine with an iFrame for my navigation links so that I only have to change it in one place (the same concept as using external CSS).



I've run into one most important, most critical, most crucial, most exasperating problem: I can't figure out how to make the link in the inline frame to force the parent directory to change.



I don't want anything complicated, if possible. My main concern is browser compatibility. If JavaScript is necessary, please keep it minimal.



Also, it needs to be capable of validation for XHTML, so if the id field works over the name field, please use that.



Thanks!Make an iFrame anchor jump parent page?
You can't. For security reasons there are many attributes of the parent window that are inaccessible to iframes. However, you could put your *content* in an iframe. The parent window can change the window.location of a child iframe all day.

No comments:

Post a Comment