Jump to content

Change Calculation


lee2121
 Share

Recommended Posts

Does anybody know how this calculation can be changed into KG's not llb's it calculates BMI

 

//BMI Form Validation... $('form.dt-sc-bmi-frm').each(function(){ $(this).validate({ rules: { txtfeet: { required: true }, txtinches: { required: true }, txtlbs: { required: true } }, errorPlacement: function(error, element) { } }); }); //BMI Calculation... $('form[name=frmbmi]').submit(function(){ var This = $(this); if(This.valid()) { var fet = This.find('input[name=txtfeet]').val(); var inc = This.find('input[name=txtinches]').val(); var tinc = ( parseInt(fet) * 12 ) + parseInt(inc); var lbs = This.find('input[name=txtlbs]').val(); var bmi = ( parseFloat(lbs) / (tinc * tinc) ) * 703; This.find('input[name=txtbmi]').val(parseFloat(bmi).toFixed(1)); } return false; }); //BMI View... if($("a.fancyInline").length) { $("a.fancyInline").fancybox({ scrolling: 'no', width: 'auto', height: 'auto' }); }

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...