photoxprt1868
Programmer
hello,
I have this simple piece of code in my page to spit out the date and it's braking my page. Without it the page works great, but with it the page doesn't display becuase of a javascript error.
I have this on the body of the page
thank you
I have this simple piece of code in my page to spit out the date and it's braking my page. Without it the page works great, but with it the page doesn't display becuase of a javascript error.
I have this on the body of the page
Code:
<SCRIPT language="JavaScript" TYPE="text/javascript">
<!--
// Set varible to the current date
var right_now=new Date();
// set variable to current month number (0-11)
var month_num = right_now.getMonth()
// set varible to the current day value (1-31)
var thedate=right_now.getDate()
// create an array for the month name
var month_name = new Array (
"January ",
"February ",
"March ",
"April ",
"May ",
"June ",
"July ",
"August ",
"September ",
"October ",
"November ",
"December ");
// Create a varible right_year with the current year
var right_year=right_now.getYear();
document.write("<b>");
document.write(month_name[month_num]);
document.write(right_year);
document.write("</b>");
</script>
thank you