the time or date does not display on web page what am i doing wrong.
<html>
<head>
<title>Form1</title>
<script language="JavaScript"><!--
function showHour(thehour){
if(thehour > 0 && thehour < 13){
return(thehour)
}
if(thehour == 0){
return(12)
}
return(thehour-12)
}
function showZero(inValue){
if(inValue > 9){
return(":" + inValue)
}
return(":0" + inValue)
}
function showAmPm(){
if(now.getHours() < 12){
return(" am"
}
return(" pm"
}
function showTime(){
now = new Date
document.frmcomplaint. showHour(now.getHours()) +
showZero(now.getMinutes()) +
showZero(now.getSeconds())+
showAmPm()
setTimeout("showTime()",1000)
}
function dodate(){
days = newArray("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"
months = new Array("Jan","Feb","March","April","May","June","July","Aug","Sept","Oct","Nov","Dec"
d = new Date()
dDay = days[d.getDay()]
dMonth = monthd[d.getMonth()]
temp = dDay +","+dMonth+""+d.getDate()+"20" + d.getYear()
document.frmcomplaint. }
//-->
</script>
</head>
<body bgcolor="000000">
<center>
<font color="ffffff">
<h2>Test page</h2></font>
</center>
<form name="frmcomplaint">
<table width="80%">
<font color="ffffff"><tr>
<td align="right"><b><font color="ffffff">Date: </b></font></td>
<td><input type="text" name=" size="11" value=""></td></tr>
<tr>
<td align="right"><b><font color="ffffff">Time: </b></font></td>
<td><input type="text" name=" size="11" value=""></td></tr>
</form>
</body>
</html>
<html>
<head>
<title>Form1</title>
<script language="JavaScript"><!--
function showHour(thehour){
if(thehour > 0 && thehour < 13){
return(thehour)
}
if(thehour == 0){
return(12)
}
return(thehour-12)
}
function showZero(inValue){
if(inValue > 9){
return(":" + inValue)
}
return(":0" + inValue)
}
function showAmPm(){
if(now.getHours() < 12){
return(" am"
}
return(" pm"
}
function showTime(){
now = new Date
document.frmcomplaint. showHour(now.getHours()) +
showZero(now.getMinutes()) +
showZero(now.getSeconds())+
showAmPm()
setTimeout("showTime()",1000)
}
function dodate(){
days = newArray("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"
months = new Array("Jan","Feb","March","April","May","June","July","Aug","Sept","Oct","Nov","Dec"
d = new Date()
dDay = days[d.getDay()]
dMonth = monthd[d.getMonth()]
temp = dDay +","+dMonth+""+d.getDate()+"20" + d.getYear()
document.frmcomplaint. }
//-->
</script>
</head>
<body bgcolor="000000">
<center>
<font color="ffffff">
<h2>Test page</h2></font>
</center>
<form name="frmcomplaint">
<table width="80%">
<font color="ffffff"><tr>
<td align="right"><b><font color="ffffff">Date: </b></font></td>
<td><input type="text" name=" size="11" value=""></td></tr>
<tr>
<td align="right"><b><font color="ffffff">Time: </b></font></td>
<td><input type="text" name=" size="11" value=""></td></tr>
</form>
</body>
</html>