Full version: jsB@nk » Utility » Weight Watchers Points Calculator
URL: https://www.javascriptbank.com/weight-watchers-points-calculator.html
Are you creating a diet Web site? Are you using the Weight Watchers Points plan to lose weight? If so, this little calculator might just come in handy. A simple but quick method to figure WW points.
Full version: jsB@nk » Utility » Weight Watchers Points Calculator
URL: https://www.javascriptbank.com/weight-watchers-points-calculator.html
<script type="text/javascript">// Created by: Webmilhouse | http://www.webmilhouse.com/function calculate() { var doc = document.pointCalc; var points = 0; var fiber = doc.fiber.value; var fat = doc.fat.value; var calories = doc.calories.value; points = (calories / 50) + (fat / 12) - (fiber / 5); doc.result.value = Math.round(points);}</script>
<form name="pointCalc"><table><tr><td width="100">Calories:</td><td><input type="text" name="calories" size="5" style="text-align: right;"></td></tr><tr><td>Fat:</td><td><input type="text" name="fat" size="5" style="text-align: right;"></td></tr><tr><td>Fiber:</td><td><input type="text" name="fiber" size="5" style="text-align: right;"></td></tr><tr><td colspan="2"><input type="button" value="Calculate" onClick="calculate();"></td></tr><tr><td><strong>Points:</strong></td><td><input type="text" name="result" size="5" readonly="readonly" style="border: none; text-align: right; font-weight: bold;"></td></tr></table></form>