I am working on a time sheet form. I have the day of the week(e.g. Tuesday) in a dropdown menu and a text box for the date(Jul 24, 2001). What I would like to do, if possible, is, when the user selects the day of the week, the date is automatically filled in. I calculate all the dates based on the week-ending date selected on a previous page. Here is the code for the form:
Any ideas, or is this just not practical? Calista :-X
Jedi Knight,
Champion of the Force
Code:
ORM ACTION="ProcessTime.cfm" METHOD="post" NAME="TimeSheet" ID="TimeSheet">
<TABLE ALIGN="center" CELLSPACING="2" CELLPADDING="2" BORDER="1">
<TR>
<TD><SELECT NAME="DayOfWeek" SIZE="5">
<OPTION VALUE="Monday" ONCLICK=<CFSET DateToday=#MonDate#>>Monday</OPTION>
<OPTION VALUE="Tuesday" ONCLICK=<CFSET DateToday=#TuesDate#>>Tuesday</OPTION>
<OPTION VALUE="Wednesday" ONCLICK=<CFSET DateToday=#WedDate#>>Wednesday</OPTION>
<OPTION VALUE="Thursday" ONCLICK=<CFSET DateToday=#ThursDate#>>Thursday</OPTION>
<OPTION VALUE="Friday" ONCLICK=<CFSET DateToday=#FriDate#>>Friday</OPTION>
<OPTION VALUE="Saturday" ONCLICK=<CFSET DateToday=#SatDate#>>Saturday</OPTION>
<OPTION VALUE="Sunday" ONCLICK=<CFSET DateToday=#SunDate#>>Sunday</OPTION>
</SELECT>
</TD>
<TD></TD>
<TD><INPUT TYPE="text" NAME="NameCode" SIZE="20" MAXLENGTH="20" VALUE="#DateToday#"></TD>
</TR>
</TABLE>
Jedi Knight,
Champion of the Force