estesflyer
Programmer
here is my script, when I click on the link that closes the window (the new window) the prompts keep coming up.
<html>
<title></title>
<script language="javascript">
<!--
function openwin()
{
var name=window.prompt("What is your first name?","Fred"
var color=window.prompt("What background color do you want?","orange"
var newin=window.open("","newindow","width=300,height=500,status=yes"
newin.document.write("<html>"
newin.document.write("<head>"
newin.document.write("<title>Hey " + name + ", thanks for dropping in!</title>"
newin.document.write("</head>"
newin.document.write("<body bgcolor=" + color + ">"
newin.document.write("<h1>here is your customized window, " + name + "</h1>"
newin.document.write('<a href="#" onClick="self.close";>Click here to close this window</a>');
}
//-->
</script>
</head>
<body onLoad="openwin()">
hello world!
<script language="javascript">
<!--
//-->
</script>
</body>
</html>
<html>
<title></title>
<script language="javascript">
<!--
function openwin()
{
var name=window.prompt("What is your first name?","Fred"
var color=window.prompt("What background color do you want?","orange"
var newin=window.open("","newindow","width=300,height=500,status=yes"
newin.document.write("<html>"
newin.document.write("<head>"
newin.document.write("<title>Hey " + name + ", thanks for dropping in!</title>"
newin.document.write("</head>"
newin.document.write("<body bgcolor=" + color + ">"
newin.document.write("<h1>here is your customized window, " + name + "</h1>"
newin.document.write('<a href="#" onClick="self.close";>Click here to close this window</a>');
}
//-->
</script>
</head>
<body onLoad="openwin()">
hello world!
<script language="javascript">
<!--
//-->
</script>
</body>
</html>