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

Q405 How can I load a page within a page when a button is pushed?

You are here: irt.org | FAQ | DHTML | Q405 [ previous next ]

In Netscape Navigator 4 using Layers and in Internet Explorer 3 and Internet Explorer 4 using Floating Frames. Combined together as:

<script language="JavaScript"><!--
function change() {
    if (document.layers)
        document.layers[0].src='test2.htm';
    else if (document.frames.length > 0)
        document.frames[0].location.href='test2.htm';
}
//--></script>

<form>
<input type="button" onClick="change()" value="Change">
</form>

<layer src="test.htm" style="position:relative; width:200; height:100;"></layer>
<iframe src="test.htm" width="200" height="100" frameborder="0" marginheight="0" marginwidth="0"></iframe>

©2018 Martin Webb