Indy K

test

$().ready(function () { $(‘#mybutton’).click(function (e) { CalcTDEEFunction(); // Call your other function here return false; }); }); function findSelection(field) { var radios = document.getElementsByName(field); for (var i = 0, length = radios.length; i < length; i++) { if (radios[i].checked) { // do whatever you want with the checked radio return (radios[i].value); // only one radio can be logically checked, don't check the rest break; } } return false; } function CalcTDEEFunction(value) { var genderS = findSelection("gender"); var unitS = findSelection("unit"); var exS = value; var result = ""; var weightKG; var IntWeight = 1; var CalcFactor = 1; var WeightFactor = 1; var HeightFactor = 1; var AgeFactor = 1; var Age = findSelection("age"); var HeightCM = 1; var exFactor = 1; var BMR = 1; weightKG = document.getElementById("weight").value; if (unitS == "Pounds") { IntWeight = Number(weightKG); IntWeight = IntWeight * 0.45359237; weightKG = IntWeight.toFixed(3); // Fixed to 3 decimal places } //alert(weightKG); // Show pop up message if (genderS == "male") { CalcFactor = 66; // check this number WeightFactor = 13.7; HeightFactor = 5; AgeFactor = 6.8; } else { CalcFactor = 655; // check this you meesaged me 655 WeightFactor = 9.6; HeightFactor = 1.8; AgeFactor = 4.7; } switch (exS) { case "light": exFactor = 1.376; break; case "moderate": exFactor = 1.55; break; case "heavy": exFactor = 1.725; break; case "daily": exFactor = 1.9; break; default: exFactor = 1.2; } HeightCM = (Number(document.getElementById("feet").value) * 12 + (Number(document.getElementById("inches").value))) * 2.54; BMR = Number(CalcFactor) + (Number(WeightFactor) * Number(weightKG)); BMR += (Number(HeightFactor) * Number(HeightCM)); result = Number(AgeFactor) * Number(document.getElementById("age").value); BMR -= result; TDEE = BMR * exFactor; TDEEBF = TDEE - ((TDEE / 100) * 20); TDEEAM = TDEE + ((TDEE / 100) * 20); current = document.getElementById("tdeeval"); current.setAttribute("value", TDEE.toFixed(0)); current = document.getElementById("tdeebfval"); current.setAttribute("value", TDEEBF.toFixed(0)); current = document.getElementById("tdeeamval"); current.setAttribute("value", TDEEAM.toFixed(0)); return false; } function isNumberKey(evt) { var charCode = (evt.which) ? evt.which : event.keyCode if (charCode > 31 && (charCode < 48 || charCode > 57)) return false; return true; } Total Daily Energy Expenditure (TDEE) quantifies the number of calories you burn in a day.
Calculate how many calories you need per day to reach your goal.

Gender Male Female
Weight: POUNDS KG
Height:
Feet: Inches
Age:

Weekly Exercise



Your TDEE————–>
-20% (To burn Fat)—– >
+20%(To Add Muscle)->