views:

30

answers:

1

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
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
Then change the URL.
SLaks
If your code is in the framed page, you can write `top.location = location`.
SLaks