jquery calculation - NaN and formatting
<p>This is my code: </p>

<pre><code>&lt;script src="js/jquery.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="js/jquery.field.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script src="js/jquery.calculation.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script&gt;

$(function() {
      $('input[name^=sum]').keyup(function() {
            var sum1 = parseFloat($('input[name=sum1]').val());
            var sum2 = parseFloat($('input[name=sum2]').val()); 
    var sum3 = parseFloat($('input[name=sum3]').val()); 


            $('#c_card_amount').val(sum1*sum3/100);
    $('#total_inc_charges').val((sum1*sum3/100)+sum1);
    });
});

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

<p>My questions:</p>

<ol>
<li><p>If no value is in <code>sum1</code> the <code>c_card_amount</code> and the <code>total_inc_charges</code> are <code>NaN</code>. How can I put a condition in this that says if no value is in <code>sum1</code> just show 0 in <code>total_inc_charges</code>. I've read about this but I could not figure out the answer in terms of my code. </p></li>
<li><p>My second question is: how can I show the numbers in 1,000.00 format for instance? </p></li>
</ol>
