pipidodo

Calorie Calculator /js/calcfood.js

Jun 23rd, 2021
793
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     document.write('<table style="width:100%">');
  2. // TIME EATEN
  3.     document.write('<tr><td style="width:30%"><fieldset class="fibl"><legend>Eating time:</legend>');
  4.     document.write('<select id="eath" onchange="eattime(\'eath\')" class="fiel" style="text-align:center; background-color:#ffe8e9">');
  5.     writeh('#ffe8e9');
  6.     document.write('</select> H.  ');    
  7.     document.write('<select id="eatm" onchange="eattime(\'eatm\')" class="fiel" style="text-align:center; background-color:#ffe8e9">');
  8.     writem('#ffe8e9');
  9.     document.write('</select> M.');        
  10.     document.write('</fieldset></td>');
  11. // END TIME EATEN  
  12. // FOOD AMOUNTS
  13.     document.write('<td colspan="2" style="width:70%"><fieldset class="fibl"><legend>Food Amounts:</legend>');
  14.     document.write('<input type="text" id="aantal" value="1" class="tees" onchange="aantal()" style="width:3em; text-align:center; background-color:#ffe8e9"><span style="position:relative; left:0.5em">(=)</span> ');
  15.     document.write('<input type="text" id="measure" value="" class="tees"  onchange="grammen()"style="width:5em; text-align:center; background-color:#ffe8e9; position:relative; left:1.5em"> ');
  16.    document.write('<input type="button" id="common" class="fiel" onclick="gram()" onmouseover="but(\'common\',\'#e9ffe8\',\'navy\')" onmouseout="but(\'common\',\'#ffe8e9\',\'navy\')" style="position:relative; width:6em; left:2em ;background-color:#ffe8e9" value="gram">');  
  17.    document.write('<span style="position:relative; left:2em"> = </span><input type="text" id="KJ" value="" class="tees" style="width:7em; text-align:center; background-color:#ffe8e9; position:relative; left:3.5em"> ');
  18.    document.write('<input type="button" id="KaJo" class="fiel" onclick="kilju()" onmouseover="but(\'KaJo\',\'#e9ffe8\',\'navy\')" onmouseout="but(\'KaJo\',\'#ffe8e9\',\'navy\')" style="position:relative; width:6em; left:4em ;background-color:#ffe8e9" value="Kcal">');  
  19.     document.write('</fieldset></td></tr>');
  20. // END FOOD AMOUNTS
  21. // TOTALS AND BUTTONS
  22.     document.write('<tr><td style="width:30%"><input type="button" id="resetA" class="fiel" onclick="clr()" onmouseover="but(\'resetA\',\'#e9ffe8\',\'navy\')" onmouseout="but(\'resetA\',\'#ffe8e9\',\'navy\')" style="width:10em; background-color:#ffe8e9" value="Reset Food"></td>');
  23.     document.write('<td style="width:35%"><input type="button" id="submit" class="fiel" onclick="foodadd()" onmouseover="but(\'submit\',\'#e9ffe8\',\'navy\')" onmouseout="but(\'submit\',\'#ffe8e9\',\'navy\')" style="background-color:#ffe8e9" value="Add">');
  24.     document.write('<input type="button" id="resetL" class="fiel" onclick="popFood()" onmouseover="but(\'resetL\',\'#e9ffe8\',\'navy\')" onmouseout="but(\'resetL\',\'#ffe8e9\',\'navy\')" style="background-color:#ffe8e9" value="Undo Last"></td>');
  25.     document.write('<td style="width:35%"><fieldset class="fibl"><legend>Total energy intake:</legend><textarea rows="1" id="totalKJ" class="tots"></textarea></td>');
  26.  
  27. // END TOTALS AND BUTTONS
RAW Paste Data