You are here: irt.org | FAQ | JavaScript | Frame | Q315 [ previous next ]
The following works for me:
<SCRIPT LANGUAGE="JavaScript"><!-- function newWindow(fileName,windowName) { myRemote=window.open(fileName,windowName); myRemote.location.href = fileName; if (myRemote.opener == null) myRemote.opener = window; } //--></SCRIPT> <FORM> <INPUT TYPE="BUTTON" VALUE="Open Pop-Up Frame" onClick="newWindow('popup.html','control')"> <INPUT TYPE="BUTTON" VALUE="Load into frame 1" onClick="myRemote.frameName1.location.href='cpage.html'"> <INPUT TYPE="BUTTON" VALUE="Load into frame 2" onClick="myRemote.frameName2.location.href='cpage.html'"> </FORM>
And then in popup.html:
<FRAMESET ROWS="50%,*"> <FRAME SRC="apage.html" NAME="frameName1"> <FRAME SRC="bpage.html" NAME="frameName2"> </FRAMESET>