96turnerri
09-09-2003, 08:59 AM
hi this is what i have so far it displays the current date in an online form box
<head>
<SCRIPT LANGUAGE="JavaScript">
function StartDate() {
TDay = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
TMonth = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
TDate = new Date();
CurYear = TDate.getYear();
CurMonth = TDate.getMonth();
CurDayOw = TDate.getDay();
CurDay= TDate.getDate();
TheDate = TDay[CurDayOw] + ', ';
TheDate += TMonth[CurMonth] + ' ';
TheDate += CurDay + ', ';
if (CurYear < 2000) CurYear = CurYear + 1900;
TheDate += CurYear;
document.CForm.CDate.value = TheDate;
}
</SCRIPT>
</head>
<BODY onLoad="StartDate()";>
<FORM NAME="CForm">
<TABLE>
<TD><INPUT TYPE="text" NAME="CDate" SIZE="27"></TD>
</TABLE>
</FORM>
</body>
but the user can delete the data in the box, i found a script yesterday to lock it but i cant find it now, its on this site, if someone knows it can they plz let me no
<head>
<SCRIPT LANGUAGE="JavaScript">
function StartDate() {
TDay = new Array('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
TMonth = new Array('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
TDate = new Date();
CurYear = TDate.getYear();
CurMonth = TDate.getMonth();
CurDayOw = TDate.getDay();
CurDay= TDate.getDate();
TheDate = TDay[CurDayOw] + ', ';
TheDate += TMonth[CurMonth] + ' ';
TheDate += CurDay + ', ';
if (CurYear < 2000) CurYear = CurYear + 1900;
TheDate += CurYear;
document.CForm.CDate.value = TheDate;
}
</SCRIPT>
</head>
<BODY onLoad="StartDate()";>
<FORM NAME="CForm">
<TABLE>
<TD><INPUT TYPE="text" NAME="CDate" SIZE="27"></TD>
</TABLE>
</FORM>
</body>
but the user can delete the data in the box, i found a script yesterday to lock it but i cant find it now, its on this site, if someone knows it can they plz let me no