I have one text box I want the user to fill out with a date, I then have a second text box i want to be poulated with the date entered in the first text box plus 14 days.
So far I have the following
function addDays(myDate,days) {
var myDate = new date();
myDate.setDate(myDate.getDate() + days);
document.frmPermVacReq.txt_closing_date.value = myDate;
}
The first text box has an onBlur action as follows:
<input type="text" name="txt_ad_date" value ="" onBlur="addDays(txt_ad_date, 14)">
The second txt box is coded as follows:
<input type="text" name="txt_closing_date" value="" >
Every time I try this I get the following error:
'date is undefined'
at the following line of code
var adDate = new date();
any ideas???
So far I have the following
function addDays(myDate,days) {
var myDate = new date();
myDate.setDate(myDate.getDate() + days);
document.frmPermVacReq.txt_closing_date.value = myDate;
}
The first text box has an onBlur action as follows:
<input type="text" name="txt_ad_date" value ="" onBlur="addDays(txt_ad_date, 14)">
The second txt box is coded as follows:
<input type="text" name="txt_closing_date" value="" >
Every time I try this I get the following error:
'date is undefined'
at the following line of code
var adDate = new date();
any ideas???