Actually, you wrote it correctly. That prototype function is fine. The problem is with the lines:
Code:
var tDate = new Date();
document.theClock.theTime.value = ""
+ tDate.getMonth() + " "
+ tDate.getDay() + ", "
+ tDate.getYear() + " "
+ tDate.getHours() + ":"
+ tDate.getMinutes() + ":"
+ tDate.getSeconds();
These need to have the plus sign at the end of the lines, so that the javascript interpreter won't think that you just left out a semicolon and treat it as an "end line."
Code:
var tDate = new Date();
document.theClock.theTime.value = tDate.getMonthName() + " " +
tDate.getDate() + ", " +
tDate.getFullYear() + " " +
tDate.getHours() + ":" +
tDate.getMinutes() + ":" +
tDate.getSeconds();
Also, I replaced getDay() with getDate() (as getDay gets the day of the week, 0-6), and getYear() with getFullYear().