Difference between revisions of "Test"

From Fellrnr.com, Running tips
Jump to: navigation, search
User:Fellrnr (User talk:Fellrnr | contribs)
(Created page with "<html> <script type="text/javascript"> var isArray = function (obj) { return Object.prototype.toString.call(obj) === "[object Array]"; }, getNumWithSetDec = function( num, numOf...")
 
User:Fellrnr (User talk:Fellrnr | contribs)
Line 37: Line 37:
 
function doCalc()
 
function doCalc()
 
{
 
{
Monotony.trimp_1.value = Monotony.Dur_1.value * Monotony.cr10_1.value;
+
var d1 = document.getElementById('dur_1').innerHTML;
 +
alert(d1);
 +
var c1 = document.getElementById('cr10_1').innerHTML;
 +
alert(c1);
 +
var t1 = d1 * c1;
 +
alert(t1);
 +
document.getElementById('trimp_1').innerHTML = t1;
 
}
 
}
 
</script>
 
</script>
  
<form name="Monotony">
+
<form style="font-family: Helvetica,Arial,sans-serif;" id="Monotony">
   <table border="1" cellpadding="1" cellspacing="1">
+
   <table style="text-align: left;" border="1" cellpadding="1" cellspacing="1">
 
       <tr>
 
       <tr>
 
         <th>Day</th>
 
         <th>Day</th>
Line 51: Line 57:
 
       <tr>
 
       <tr>
 
       <td>1</td>
 
       <td>1</td>
         <td><input maxlength="3" size="3" name="Dur_1" value="0"></td>
+
         <td><input maxlength="3" size="3" id="Dur_1" value="0"></td>
         <td><input maxlength="3" size="3" name="cr10_1" value="0"></td>
+
         <td><input maxlength="3" size="3" id="cr10_1" value="0"></td>
         <td><input maxlength="3" size="3" name="trimp_1" value="0" readonly="readonly"></td>
+
         <td><label id="trimp_1"></label></td>
 
       </tr>
 
       </tr>
 
       <tr>
 
       <tr>
 
       <td>2</td>
 
       <td>2</td>
         <td><input maxlength="3" size="3" name="Dur_2" value="0"></td>
+
         <td><input maxlength="3" size="3" id="Dur_2" value="0"></td>
         <td><input maxlength="3" size="3" name="cr10_2" value="0"></td>
+
         <td><input maxlength="3" size="3" id="cr10_2" value="0"></td>
         <td><input maxlength="3" size="3" name="trimp_2" value="0" readonly="readonly"></td>
+
         <td><input maxlength="3" size="3" id="trimp_2" value="0" readonly="readonly"></td>
 
       </tr>
 
       </tr>
 
       <tr>
 
       <tr>
 
       <td>3</td>
 
       <td>3</td>
         <td><input maxlength="3" size="3" name="Dur_3" value="0"></td>
+
         <td><input maxlength="3" size="3" id="Dur_3" value="0"></td>
         <td><input maxlength="3" size="3" name="cr10_3" value="0"></td>
+
         <td><input maxlength="3" size="3" id="cr10_3" value="0"></td>
         <td><input maxlength="3" size="3" name="trimp_3" value="0" readonly="readonly"></td>
+
         <td><input maxlength="3" size="3" id="trimp_3" value="0" readonly="readonly"></td>
 
       </tr>
 
       </tr>
 
       <tr>
 
       <tr>
 
       <td>4</td>
 
       <td>4</td>
         <td><input maxlength="3" size="3" name="Dur_4" value="0"></td>
+
         <td><input maxlength="3" size="3" id="Dur_4" value="0"></td>
         <td><input maxlength="3" size="3" name="cr10_4" value="0"></td>
+
         <td><input maxlength="3" size="3" id="cr10_4" value="0"></td>
         <td><input maxlength="3" size="3" name="trimp_4" value="0" readonly="readonly"></td>
+
         <td><input maxlength="3" size="3" id="trimp_4" value="0" readonly="readonly"></td>
 
       </tr>
 
       </tr>
 
       <tr>
 
       <tr>
 
       <td>5</td>
 
       <td>5</td>
         <td><input maxlength="3" size="3" name="Dur_5" value="0"></td>
+
         <td><input maxlength="3" size="3" id="Dur_5" value="0"></td>
         <td><input maxlength="3" size="3" name="cr10_5" value="0"></td>
+
         <td><input maxlength="3" size="3" id="cr10_5" value="0"></td>
         <td><input maxlength="3" size="3" name="trimp_5" value="0" readonly="readonly"></td>
+
         <td><input maxlength="3" size="3" id="trimp_5" value="0" readonly="readonly"></td>
 
       </tr>
 
       </tr>
 
       <tr>
 
       <tr>
 
       <td>6</td>
 
       <td>6</td>
         <td><input maxlength="3" size="3" name="Dur_6" value="0"></td>
+
         <td><input maxlength="3" size="3" id="Dur_6" value="0"></td>
         <td><input maxlength="3" size="3" name="cr10_6" value="0"></td>
+
         <td><input maxlength="3" size="3" id="cr10_6" value="0"></td>
         <td><input maxlength="3" size="3" name="trimp_6" value="0" readonly="readonly"></td>
+
         <td><input maxlength="3" size="3" id="trimp_6" value="0" readonly="readonly"></td>
 
       </tr>
 
       </tr>
 
       <tr>
 
       <tr>
 
       <td>7</td>
 
       <td>7</td>
         <td><input maxlength="3" size="3" name="Dur_7" value="0"></td>
+
         <td><input maxlength="3" size="3" id="Dur_7" value="0"></td>
         <td><input maxlength="3" size="3" name="cr10_7" value="0"></td>
+
         <td><input maxlength="3" size="3" id="cr10_7" value="0"></td>
         <td><input maxlength="3" size="3" name="trimp_7" value="0" readonly="readonly"></td>
+
         <td><input maxlength="3" size="3" id="trimp_7" value="0" readonly="readonly"></td>
 
       </tr>
 
       </tr>
 
   </table>
 
   </table>
   <label name="Monotony">Monotony:</label>
+
   <label id="Monotony">Monotony:</label>
 
   <br>
 
   <br>
   <input type="button" value="Calculate" OnClick="doCalc();"/>
+
   <input type="button" value="Calculate" onclick="doCalc()"/>
</form>
 
 
</html>
 
</html>

Revision as of 18:34, 22 February 2012

Day Duration (min) CR10 Rating TRIMP(CR10)
1
2
3
4
5
6
7