Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap

Q404 Is there a way that a button can be kept from reloading a frame again until the frame is reloaded?

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

If you own all the pages - then yes:

<script language="JavaScript"><!--
var loaded_it_yet = true;

<frameset rows="50%,*">
<frame src="mainpage.htm">
<frame src="otherframe.htm">

and then in mainpage:

<script language="JavaScript"><!--
function check_first() {
    if (parent.loaded_it_yet) {
        parent.frames[1].location.href = parent.frames[1].location.href;
        parent.loaded_it_yet = true;

<input type="button" value="Reload" onClick="check_first()">

and then in otherframe.htm:

<body onLoad="parent.loaded_it_yet = true">

©2018 Martin Webb