Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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

irt.org | Knowledge Base | DHTML | Q405 [ previous next ]

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

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>

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.