Break Frames In HTML & JavaScript

Normally when you want to break out of frames to go to another site or if you simply want the frames to go away you would put target="_top" in the link to make this happen. The first example below is the HTML way and the second is the Javascript way of breaking out of frames. These method also work with an IFrame.

The "Javascript Way" link below will not to take you to "www.lycos.com". That's because it only works in a framed page.

The HTML Way The Javascript Way

<a href="https://www.lycos.com/" target="_top">The HTML Way</a>

OR

<a href="javascript:void(0)" onclick="top.window.location='https://www.lycos.com/
'">The Javascript Way</a>

Highlight The Source Code Below



<<< Back



Home Page       This Page Was Last Updated: