Home : Internet : JavaScript : Frames : Breakout

How to Break Out of a Frameset

This javascript forces the page to break out of a frameset, that is, if the page is loaded inside a frame it will remove the frameset and make the page take the whole window.

Place the following code in the page head:

<script language="javascript" type="text/javascript">
if (self != top) {
    if (document.images)
        top.location.href = window.location.href;