title: Javascript Textbox Values output NAN on.Change
body: <p>I am really really new to javascript and tried googling. but I don't find any luck.
  So please help me, everytime i input a value into a textbox. the other textbox's will show "nan" then when I tried to change the NaN Value, the first textbox that I typed in to will return the first thousand digits of the value.</p>
  
  <p>here is the <a href="http://jsfiddle.net/zzxwV/5/" rel="nofollow">Fiddle</a> of my proble</p>
  
  <p>and these are my codes</p>
  
  <pre><code>$(document).on('change', '#family_home,#home_contents,#motor_vehicle,#Total', function() {
  updateTotal();
      });       
  var updateTotal =function() {
  var a = parseInt($('#family_home').val());
  $('#family_home').val(a.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
  var b = parseInt($('#home_contents').val());
  $('#home_contents').val(b.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
  var c = parseInt($('#motor_vehicle').val());
  $('#motor_vehicle').val(c.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","));
  var total = parseInt(a)+parseInt(b)+parseInt(c);   
  $("#Total").html(total);         
  };  
  </code></pre>
  
  <p>Please Please help. Thanks. I know im a newbie but I want to gain more knowledge from you guys. so please pass it on to me. Thanks</p>