I am sure I am missing the trees from the forest here but I am really in need of some guidance. I have the following script that I am modifying
to work within a webpage in order to log dated activities. I can print the date variables via "document.write" but for some reason can not seem to
get the variable to show up in the textboxes.
Any help would be greatly appreciated
CODE
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<script type="text/javascript" language="JavaScript">
function getMonthDate()
{
var months = new Array(13);
months[0] = "January";
months[1] = "February";
months[2] = "March";
months[3] = "April";
months[4] = "May";
months[5] = "June";
months[6] = "July";
months[7] = "August";
months[8] = "September";
months[9] = "October";
months[10] = "November";
months[11] = "December";
var now = new Date();
var monthnumber = now.getMonth();
var monthname = months[monthnumber];
var monthString = monthnumber + 1;
return monthString;
} // function getMonthDate()
function getDayDate()
{
var now = new Date();
var monthday = now.getDate();
var DayString = monthday;
return DayString;
} // function getDayDate()
function getYearDate()
{
var now = new Date();
var year = now.getYear();
if(year < 2000) { year = year + 1900; }
var YearString = year;
return YearString;
} // function getDayDate()
</script>
</head>
<body>
<script>
var monthnumber = getMonthDate();
var monthday = getDayDate();
var year = getYearDate();
// Show the variables are moving thru the script
document.write('Date is ');
document.write('<br>');
document.write(monthnumber);
document.write('<br>');
document.write(monthday);
document.write('<br>');
document.write(year);
document.write('<br>');
</script>
//EVERYTHING APPEARS TO WORK FINE TO THIS POINT
<p><br>
Month
Day
Year<br>
Today's Date:
<input type=text name=monthnumber size=6>
<input type=text name=monthday size=6>
<input type=text name=year size=6>
</p>
</body>
</html>