Hi: I am an retired school teacher who went back to school for the fun of it. my subjects were computer hardware. I am taking a course in javascript and it is about to get the better of me. I need some help with is this one. I got it to validate. But something is wrong with the logic maybe. It bombs out on object expected .
Please give me some input. thanks
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Digita l Clock</title>
<script type="text/javascript">
<!-- HIDE FROM INCOMPATIBLE BROWSERS
function curTime() {
var now = new date();
var day = now.GetDay();
var date = now.GetDate();
var year = now.GetFullYear ();
var month = now.GetMonth();
var hours = now.GetHours() + 1;
var minutes = now.GetMinutes( );
var seconds = now.GetSeconds( );
var days = new Array();
days[0] = "Sunday"; days[1] = "Monday"; days[2] = "Tuesday";
days[3] = "Wednesday" ; days[4] = "Thursday"; days[5] = "Friday";
days[6]="Saturday";
var display = days[day] + " " + month + "/" + date + "/"
+ year + " "+ hours + ":" + minutes + ":" + seconds;
document.forms[0].Readout.value = display;
}
var tick = setInterval("cu rTime()", 1000);
// STOP HIDING FROM INCOMPATIBLE BROWSERS --></script></head>
<body>
<form action="">
<p><input type="text" size="30" name="readout" /></p>
</form>
</body>
</html>
Please give me some input. thanks
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Digita l Clock</title>
<script type="text/javascript">
<!-- HIDE FROM INCOMPATIBLE BROWSERS
function curTime() {
var now = new date();
var day = now.GetDay();
var date = now.GetDate();
var year = now.GetFullYear ();
var month = now.GetMonth();
var hours = now.GetHours() + 1;
var minutes = now.GetMinutes( );
var seconds = now.GetSeconds( );
var days = new Array();
days[0] = "Sunday"; days[1] = "Monday"; days[2] = "Tuesday";
days[3] = "Wednesday" ; days[4] = "Thursday"; days[5] = "Friday";
days[6]="Saturday";
var display = days[day] + " " + month + "/" + date + "/"
+ year + " "+ hours + ":" + minutes + ":" + seconds;
document.forms[0].Readout.value = display;
}
var tick = setInterval("cu rTime()", 1000);
// STOP HIDING FROM INCOMPATIBLE BROWSERS --></script></head>
<body>
<form action="">
<p><input type="text" size="30" name="readout" /></p>
</form>
</body>
</html>
Comment