We need javascript to calculate date and fill the fields.
Our order form consists of 4 fields:
<TABLE>
<TR>
<TD><b>Sub Date</TD>
<TD><INPUT TYPE="text" NAME="date"
onKeyDown="if(event.keyCode==13) event.keyCode=9;" value=2009-08-28></TD>
<TR>
<TR>
<TD><b>Processing Period:</TD>
<TD><INPUT TYPE="text" NAME="processing" size="3" onchange="this.form.due_date.value=addDays(processing)"; onKeyDown="if(event.keyCode==13) event.keyCode=9;"></TD>
</TR>
<TD><b>Due Date:</TD>
<TD><INPUT TYPE="text" NAME="due_date" <!-- onKeyDown="if(event.keyCode==13) event.keyCode=9;" <!--value=2009---></TD>
</TR>
<TR>
<TD><b>Client Delivery Date:</TD>
<TD><INPUT TYPE="text" NAME="due_date_client" onKeyDown="if(event.keyCode==13) event.keyCode=9;" value=2009->(Next <u>business</u> day after getting from the Consulate)</TD>
</TR>
</table>
We need the script to automatically calc and prefill the Due Date field (Today + Processing days) and Client Delivery Date (Today + Processing days + 1 day).
Currently used script produces bugs.