A Main Window Document
<HTML> <HEAD> <TITLE>Main Document</TITLE> <SCRIPT LANGUAGE="JavaScript"> function newWindow() { window.open("http://www.java2s.com","sub","HEIGHT=200,WIDTH=200") } </SCRIPT> </HEAD> <BODY> </FORM> <INPUT TYPE="button" VALUE="New Window" onClick="newWindow()"> <BR> Text incoming from subwindow: <INPUT TYPE="Text" NAME="entry"> <FORM> </BODY> </HTML>