Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q396 How can I have image buttons that remove and reload the frameset?

You are here: irt.org | FAQ | JavaScript | Frame | Q396 [ previous next ]

To remove the frame, in mytop.htm:

<a href="mypage.htm" target="_top"><img src="close.gif" width="16" height="16"></a>

To reload the frame, in mypage.htm:

<script language="JavaScript"><!--
if (parent != self) {
document.write('<a href="myframe.htm" target="_top"><img src="open.gif" width="16" height="16"><\/a>');
}
//--></script>

and then in myframe.html:

<frameset rows="16,*">
<frame src="mytop.htm">
<frame src="mypage.htm">
</frameset>

©2018 Martin Webb