I am making websites I refer to from my site load up in a frame (similar to google images). But I also want to give users the ability to break out of that frame. Like with google image's "Remove Frame" link at the bottom right corner of their frame. How can I do this possiblyusing Javascript?
A:
Like this:
top.location = "URL of framed page";
Alternatively, you can make a regular <a>
tag with target="_top"
.
SLaks
2010-04-11 18:02:43
I need it to be the other way around. This closes the referred site and takes the user to the frame's page. I want the frame to close and the user to be taken to the refereed site.
Daniel
2010-04-11 18:06:31
Then change the URL.
SLaks
2010-04-11 18:08:00
If your code is in the framed page, you can write `top.location = location`.
SLaks
2010-04-11 18:08:45