ok so i'm trying to get the Day to show up, i know of the dateObj.getDay() and i have the array built to house the names of the days, but i can't get it to work, check out my code and let me know what is wrong with it
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
var cute = new Date();
var hour = cute.getHours();
var minutes = cute.getMinutes();
if (hour > "12"
hours = (hour * 1) - 12;
else
hours = hour;
var time = hour + ":" + minutes;
function promptwindow() {
var promptwin = prompt("What is your name?",""
;
if ( (promptwin == null) || (promptwin == ""
)
promptwin = "NO DATA"
newWindow=window.open("","","status,height=200,width=300"
;
newWindow.document.open();
newWindow.document.write('<html><body>');
newWindow.document.write(promptwin);
newWindow.document.write('<br><strong>Browser:</strong> ', browser);
newWindow.document.write('<br><strong>Version:</strong> ', version);
newWindow.document.write('<br><strong>Time:</strong> ', time);
newWindow.document.write(dateobj.getdays())
newWindow.document.write('</body></html>');
newWindow.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>
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
var cute = new Date();
var hour = cute.getHours();
var minutes = cute.getMinutes();
if (hour > "12"
hours = (hour * 1) - 12;
else
hours = hour;
var time = hour + ":" + minutes;
function promptwindow() {
var promptwin = prompt("What is your name?",""
if ( (promptwin == null) || (promptwin == ""
promptwin = "NO DATA"
newWindow=window.open("","","status,height=200,width=300"
newWindow.document.open();
newWindow.document.write('<html><body>');
newWindow.document.write(promptwin);
newWindow.document.write('<br><strong>Browser:</strong> ', browser);
newWindow.document.write('<br><strong>Version:</strong> ', version);
newWindow.document.write('<br><strong>Time:</strong> ', time);
newWindow.document.write(dateobj.getdays())
newWindow.document.write('</body></html>');
newWindow.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>