ok so when you click the prompt button it is supposed to launch a subwindow. all the arrays that are defined are for later in the project, right now i just need the subwindow to work so i can keep working on the project.
thanks
<html>
<head>
<script language="javascript" type="text/javascript">
<!-- Hide from older browsers.
//JavaScript code goes here.
alert("Display a message."
//Stop hiding from old browsers. -->
var months = new Array(12)
months[0] = "Jan."
months[1] = "Feb."
months[2] = "Mar."
months[3] = "Apr."
months[4] = "May"
months[5] = "Jun."
months[6] = "Jul."
months[7] = "Aug."
months[8] = "Sep."
months[9] = "Oct."
months[10] = "Nov."
months[11] = "Dec."
var days = new Array(7)
days[0] = "Sunday"
days[1] = "Monday"
days[2] = "Tuesday"
days[3] = "Wednesday"
days[4] = "Thursday"
days[5] = "Friday"
days[6] = "Saturday"
var seasons = new Array(4)
seasons[0] = "Fall"
seasons[1] = "Winter"
seasons[2] = "Spring"
seasons[3] = "Summer"
var browser = navigator.appName
var version = navigator.appVersion
function promptwindow() {
var promptwin = prompt("What is your name?",""
}
var newWindow
function makeNewWindow() {
newWindow=window.open("","",status,height=200,width=300"
}
function subWrite() {
if (newWindw.closed) {
makeNewWindow()
}
newWindow.focus()
var newContent = "<html><head><title>Homework 2</title></head>"
newContent += "<body bgcolor='coral'><h1>This document is brand New.</h1>"
newContent += "</body></html>"
newWindow.document.write(newContent)
newWindow.docment.close()
}
</script>
<title>right</title>
<meta name="author" content="David Mudder" />
<link rev="made" title="author's e-mail" href="mailto:klay2@juno.com" />
</head>
<body bgcolor="#33CC00" text="#000000">
<form name="form1" method="post" action="">
Name:
<input type="text" name="textfield" />
<br />
Address:
<input type="text" name="textfield2" />
<br />
E-mail:
<input type="text" name="textfield3" />
<br />
Male:
<input type="radio" name="radiobutton" value="radiobutton" checked />
<br />
Female:
<input type="radio" name="radiobutton" value="radiobutton" />
<br />
Unsure:
<input type="radio" name="radiobutton" value="radiobutton" />
<p>Free Magazine:
<input type="checkbox" name="checkbox2" value="checkbox" />
<br />
Free Book:
<input type="checkbox" name="checkbox3" value="checkbox" />
<br />
Free Pamphlet:
<input type="checkbox" name="checkbox" value="checkbox" />
</p>
<input type="button" name="button1" value="Prompt" onClick="promptwindow()" />
<input type="button" name="button2" value="button2" />
<input type="button" name="button3" value="button3" />
<br />
<br />
<input type="submit" name="Submit" value="Submit" />
</form>
</body>
</html>
thanks
<html>
<head>
<script language="javascript" type="text/javascript">
<!-- Hide from older browsers.
//JavaScript code goes here.
alert("Display a message."
//Stop hiding from old browsers. -->
var months = new Array(12)
months[0] = "Jan."
months[1] = "Feb."
months[2] = "Mar."
months[3] = "Apr."
months[4] = "May"
months[5] = "Jun."
months[6] = "Jul."
months[7] = "Aug."
months[8] = "Sep."
months[9] = "Oct."
months[10] = "Nov."
months[11] = "Dec."
var days = new Array(7)
days[0] = "Sunday"
days[1] = "Monday"
days[2] = "Tuesday"
days[3] = "Wednesday"
days[4] = "Thursday"
days[5] = "Friday"
days[6] = "Saturday"
var seasons = new Array(4)
seasons[0] = "Fall"
seasons[1] = "Winter"
seasons[2] = "Spring"
seasons[3] = "Summer"
var browser = navigator.appName
var version = navigator.appVersion
function promptwindow() {
var promptwin = prompt("What is your name?",""
}
var newWindow
function makeNewWindow() {
newWindow=window.open("","",status,height=200,width=300"
}
function subWrite() {
if (newWindw.closed) {
makeNewWindow()
}
newWindow.focus()
var newContent = "<html><head><title>Homework 2</title></head>"
newContent += "<body bgcolor='coral'><h1>This document is brand New.</h1>"
newContent += "</body></html>"
newWindow.document.write(newContent)
newWindow.docment.close()
}
</script>
<title>right</title>
<meta name="author" content="David Mudder" />
<link rev="made" title="author's e-mail" href="mailto:klay2@juno.com" />
</head>
<body bgcolor="#33CC00" text="#000000">
<form name="form1" method="post" action="">
Name:
<input type="text" name="textfield" />
<br />
Address:
<input type="text" name="textfield2" />
<br />
E-mail:
<input type="text" name="textfield3" />
<br />
Male:
<input type="radio" name="radiobutton" value="radiobutton" checked />
<br />
Female:
<input type="radio" name="radiobutton" value="radiobutton" />
<br />
Unsure:
<input type="radio" name="radiobutton" value="radiobutton" />
<p>Free Magazine:
<input type="checkbox" name="checkbox2" value="checkbox" />
<br />
Free Book:
<input type="checkbox" name="checkbox3" value="checkbox" />
<br />
Free Pamphlet:
<input type="checkbox" name="checkbox" value="checkbox" />
</p>
<input type="button" name="button1" value="Prompt" onClick="promptwindow()" />
<input type="button" name="button2" value="button2" />
<input type="button" name="button3" value="button3" />
<br />
<br />
<input type="submit" name="Submit" value="Submit" />
</form>
</body>
</html>