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

Q967 Can you create a complete frameset with only one HTML page?

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

Try:

<script language="JavaScript"><!--
function loaded() {
    frames[0].document.open();
    frames[0].document.write('<h1>Hello<\/h1>');
    frames[0].document.close();

    frames[1].document.open();
    frames[1].document.write('<h1>World<\/h1>');
    frames[1].document.close();
}

document.write('<frameset rows="50%,*" onLoad="loaded()">');
document.write('<frame src="about:blank">');
document.write('<frame src="about:blank">');
document.write('<\/frameset>');
//--></script>

©2018 Martin Webb