I'm trying to get the month and year from 2 dropdownboxes and compare them with today's date(month and year) It fails every date input
var today = new Date();
var month = today.getMonth();
var year = today.getYear();
var mon = document.charge.month.value
var yr = document.charge.year.value
mon = mon - 1
submitOK = "true"
else if (year > yr)
{
alert("Your card is expired")
submitOK="false"
}
else ((year == yr)&&(month > mon))
{
alert("Your card is expired")
submitOK="false"
}