<HTML> <HEAD> <SCRIPT language="JavaScript"> <!-- function newpage() { var thename= document.myform.yourname.value; var thefood= document.myform.yourfood.value; document.open(); document.write("Your name is "+thename); document.write("<BR>"); document.write("Your favorite food is "+thefood); document.close(); } //--> </SCRIPT> </HEAD> <BODY> <FORM name="myform"> Name: <INPUT type="text" name="yourname" size="25"> <P> Favorite Food: <INPUT type="text" name="yourfood" size="25"> <P> <INPUT TYPE="button" value="Click Here for a New Page" onClick="newpage()"> </FORM> </BODY> </HTML>