ok, the clock displays the weekday, the month, year and the time.
my code displays the time in a text box. I need help with the weekday month and year.
here is my code
<html>
<head>
<script language="javascript">
<!--
function runClock() {
var timeNow = new Date();
var hours = timeNow.getHours();
var minutes = timeNow.getMinutes();
var seconds = timeNow.getSeconds();
var ampm = "";
(seconds < 10) ? seconds = "0" + seconds : seconds;
(minutes < 10) ? minutes = "0" + seconds : minutes;
(hours < 12) ? ampm = "AM" : ampm = "PM";
(hours > 12) ? hours = hours - 12 : hours;
(hours == 0) ? hours = 12 : hours;
var stringTime = " " + hours + ":" + minutes + ":" +
seconds + " " + ampm;
document.clockForm.clockBox.value = stringTime;
setTimeout("runClock()", 1000);
}
//-->
</script>
</head>
<body onLoad="runClock();">
<form name="clockForm">
The Time is ::
<input type="text" name="clockBox" size="11">
</form>
</body>
</html>