You are here: irt.org | FAQ | JavaScript | Window | Q398 [ previous next ]
Try something like this:
<script language="JavaScript"><!-- function createWindow() { mywindow = window.open('about:blank','mywindowname','width=300,height=300'); setTimeout('createFrameset()',10); } function createFrameset() { var output = '<frameset rows="50%,*">' + '<frame src="about:blank">' + '<frame src="about:blank">' + '<\/frameset>'; mywindow.document.write(output); setTimeout('createFrames()',10); } function createFrames() { createFrame1(); createFrame2(); } function createFrame1() { mywindow.frames[0].document.write('<h1>Hello<\/h1>'); } function createFrame2() { mywindow.frames[1].document.write('<h1>World<\/h1>'); } //--></script> <form> <input type="button" onClick="createWindow()" value="create popup frameset"> </form>