Ahh, that is easy. I had this in class. I'll paste the info.
HTML Code:
<html>
<head>
<title>"Dynamic Window with a URL"</title>
<script language="JavaScript">
<!-- Hide
var myBars = 'directories=yes,location=yes,menubar=yes';
myBars += ',status=yes,titlebar=yes,toolbar=yes';
var myOptions =
'scrollbars=yes,width=380,height=440,resizable=yes';
var myFeatures = myBars +','+myOptions;
function openWindow() {
var newWin = window.open('', 'myDoc', myFeatures);
with (newWin.document) {
writeln("<html>");
writeln("<head>");
writeln("<title>Dynamic HTML Page</title>");
writeln("<script language='JavaScript'>");
writeln(" function msg() {");
writeln(" alert('Hello'); }");
writeln("</script>");
writeln("<style type='text/css'>");
writeln(" body { font-family: arial;");
writeln(" font-size: 10pt; ");
writeln(" color: yellow; ");
writeln(" background: red; }");
writeln("</style>");
writeln("</head>");
writeln("<body>");
writeln("<h3>This is a Dynamic Page</h3><br />");
writeln("<br /><br />");
writeln("<form name='form1'>");
writeln("<input type=button value='Display Message'");
writeln("name='DisplayMessage'");
writeln("onclick='msg()'>");
writeln("<br /><br />");
writeln("<input type=button value='Close Window'");
writeln("name='CloseWin'");
writeln("onclick='self.close()'>");
writeln("</form>");
writeln("</body>");
writeln("</html>");
close();
}
}
// -->
</script>
</head>
<body>
<form name="form1">
<input type = "button"
name="openWin" value="Open Window" onclick="openWindow()">
</form>
</body>
</html>
This will create a dynamic page which is what I believe you are requesting. Let me know.