There is something wrong with this JavaScript
<p>I have developed a script for checking that user has selected a valid month and year for credit card.</p>

<pre><code>function validatemonth()
{
var dt = new Date();
var mth = dt.getMonth();
var yr = dt.getYear(); //this seems to return different data in different browsers
yr = yr + 1900;

if(eval(document.PurchaseCredit.cc_expire_month.value) &lt; mth &amp;&amp; eval(document.PurchaseCredit.cc_expire_year.value) == yr)
{
 document.getElementById('error').innerHTML = "Expiry Date cannot be less than current date."; 
 document.forms['PurchaseCredit'].submit.disabled = true;
}
else
{
 document.getElementById('error').innerHTML = ""; 
 document.forms['PurchaseCredit'].submit.disabled = false;
}
}
</code></pre>

<p>This script works well in FireFox but does not work in IE7. Why?</p>
