|
Q404 Is there a way that a button can be kept from reloading a frame again until the frame is reloaded?
irt.org | Knowledge Base | JavaScript | Frame | Q404 [ previous next ]
Q404 Is there a way that a button can be kept from reloading a frame again until the frame is reloaded?
If you own all the pages - then yes:
<head>
<script language="JavaScript"><!--
var loaded_it_yet = true;
//--></script>
</head>
<frameset rows="50%,*">
<frame src="mainpage.htm">
<frame src="otherframe.htm">
</frameset>
|
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;
}
}
//--></script>
<form>
<input type="button" value="Reload" onClick="check_first()">
</form>
|
and then in otherframe.htm:
<body onLoad="parent.loaded_it_yet = true">
|
|
|
Copyright © 1996-2008 irt.org, All Rights Reserved.