You are here: irt.org | FAQ | JavaScript | Frame | Q473 [ previous next ]
You can use the following which checks if the current document is framed:
<script language="JavaScript"><!-- if (parent != self) top.location.href = location.href; //--></script>
or the following which checks if the current document contains frames:
<script language="JavaScript"><!-- if (window.frames.length > 0) top.location.href = 'apage.htm'; //--></script>