ok so i've been working on this for a while and i'm completely confused by this, so whoever is kind enough to help out please tell me what your doing.
what the code should do is, when you click the 'prompt' button and prompt window pops up (and it does) then you enter your name, and it writes it to a dynamic webpage. thats the part i can't get to work.
also in the window the appears after you click ok, it will add the date, does anyone know how to turn the computer numbers to match the array i have set up for days?
heres the code
<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 drawPage(useName) {
var newWind = window.open("","dynCreate","height=200,width=300"
var thePage = ""
thePage += "<html><head><title>My New Page</title></head><body>"
thePage += useName
thePage += ", this page is being written dynamically."
thePage += "</body></html>"
newWind.document.write(thePage)
newWind.document.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>
what the code should do is, when you click the 'prompt' button and prompt window pops up (and it does) then you enter your name, and it writes it to a dynamic webpage. thats the part i can't get to work.
also in the window the appears after you click ok, it will add the date, does anyone know how to turn the computer numbers to match the array i have set up for days?
heres the code
<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 drawPage(useName) {
var newWind = window.open("","dynCreate","height=200,width=300"
var thePage = ""
thePage += "<html><head><title>My New Page</title></head><body>"
thePage += useName
thePage += ", this page is being written dynamically."
thePage += "</body></html>"
newWind.document.write(thePage)
newWind.document.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>