simon551
IS-IT--Management
- May 4, 2005
- 249
Code:
var projMonth="Month";
if (! (document.getElementById('projEndDate').value==''))
{
var enteredDate=document.getElementById('projEndDate');
var endDate=new Date(enteredDate);
var month=new Array(12);
month[0]="Jan";
month[1]="Feb";
month[2]="March";
month[3]="April";
month[4]="May";
month[5]="June";
month[6]="July";
month[7]="Aug";
month[8]="Sept";
month[9]="Oct";
month[10]="Nov";
month[11]="Dec";
var projMonth= month[endDate.getMonth()];
}
no matter what I enter in the projEndDate field it returns projMonth with a value of 'undefined'... do you see something I'm doing wrong here?