JQuery doesn't validate numbers larger than 9999
<p>this is really weird. </p>

<p>The morgage calculator I was working on (I had another question previous to this one) is now working the way I wanted it to EXCEPT.... that it doesn't validate values greater than 9999. </p>

<p>If you go to the link below, you'll be able to see what I mean. </p>

<p><a href="http://jsfiddle.net/fLT8C/1/" rel="nofollow">http://jsfiddle.net/fLT8C/1/</a> </p>

<p>The code is supposed to make sure that the values entered in Down payment and purchase price are actually numbers. If they're not, a message comes up, if they are, then the code validates that Purchase price is not greater than the Down Payment amount. </p>

<p>The code works... but only if the values you enter are 9999 or lower. If you do, for example... 1350000 and 5000 down payment, the code doesn't submit. If you do 9999 and 5000, no problem. </p>

<p>I'm really confused. Any ideas?</p>

<p>Here's my HTML. </p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;

&lt;head&gt;
    &lt;meta charset="utf-8" /&gt;
    &lt;title&gt;Assignment 8.1&lt;/title&gt;
    &lt;link rel="stylesheet" type="text/css" href="css/css.css"&gt;
    &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="js/js.js" charset="utf-8"&gt;&lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
        &lt;h1&gt;Mortgage Calculator&lt;/h1&gt;

    &lt;form action="calc.php" method="post" id="mortgage-form"&gt;
        &lt;p class="errorMessage" id="shouldBeNumber"&gt;*This value can only contain numbers&lt;/p&gt;
        &lt;p id="pPrice"&gt;&lt;span class="errorMessage" id="PPmustBeNumber"&gt;*&lt;/span&gt;Purchase Price:
            &lt;input type="text" name="purchase-price" id="purchase-price" value="0" /&gt;   &lt;span class="errorMessage" id="purchasePriceError"&gt;Please enter a number value!&lt;/span&gt;

        &lt;/p&gt;
        &lt;p id="dPayment"&gt;&lt;span class="errorMessage" id="DPmustBeNumber"&gt;*&lt;/span&gt;Down Payment:
            &lt;input type="text" name="down-payment" id="down-payment" value="0" /&gt;   &lt;span class="errorMessage" id="downPaymentError"&gt;Down payment value must be less than Purchase Price!&lt;/span&gt;

        &lt;/p&gt;
        &lt;p id="term"&gt;Select Term:
            &lt;select name="loan-term" id="loan-term"&gt;
                &lt;option value="noValueSelected"&gt;-- Select a Term --&lt;/option&gt;
                &lt;option value="15yrs"&gt;15 Years&lt;/option&gt;
                &lt;option value="20yrs"&gt;20 Years&lt;/option&gt;
                &lt;option value="30yrs"&gt;30 Years&lt;/option&gt;
            &lt;/select&gt;&lt;span class="errorMessage" id="termRequired"&gt; * Term is required.&lt;/span&gt;

        &lt;/p&gt;
        &lt;div id="rate"&gt;&lt;/div&gt;
        &lt;p&gt;
            &lt;input type="submit" name="submit" id="submit" value="Calculate!" /&gt;
        &lt;/p&gt;
    &lt;/form&gt;
    &lt;footer&gt;
        &lt;p&gt;&amp;copy; Copyright by Ricardo&lt;/p&gt;
    &lt;/footer&gt;
&lt;/body&gt;

&lt;/html&gt;
</code></pre>

<p>See my jquery in my jsfiddle please. </p>
