var helpme = parseInt(parent.TransDetail.myform.ClosingMonth.value); var helpme2 = parseInt(parent.TransDetail.myform.ClosingYear.value); (isNaN(helpme)) { alert("You must select a Month "& helpme); return false; } (isNaN(helpme2)) { alert("You must select a Year "& helpme2); return false; }