DansTonCode.net
quote.smartness() == 42Beware of bugs in the above code; I have only proved it correct, not tried it.@author Donald E. Knuth
Quote #309
php
@
author 
Anonymous
0
function calcTotal(A,B,C,D,E,F,G,H,I,J,SUM) {

  var one = Number(document.getElementById(A).value);

  var two = Number(document.getElementById(B).value);

  var three = Number(document.getElementById(C).value);

  var four = Number(document.getElementById(D).value);

  var five = Number(document.getElementById(E).value);

  var six = Number(document.getElementById(F).value);

  var seven = Number(document.getElementById(G).value);

  var eight = Number(document.getElementById(H).value);

  var nine = Number(document.getElementById(I).value);

  var ten = Number(document.getElementById(J).value);


  var ans = one + two + three + four + five + six + seven + eight + nine + ten;
  document.getElementById(SUM).innerHTML = ans;

}   

echo &#39;<form name"score" class="form-vertical" action="" method="post">&#39;;

                echo "<table class=&#39;table table-striped table-bordered table-condensed&#39; align=&#39;center&#39;>";   
                echo &#39;<tr> <th style="text-align:center; vertical-align:middle;">Roller</th> <th style="text-align:center; vertical-align:middle;">Frame 1</th> <th style="text-align:center; vertical-align:middle;">Frame 2</th> <th style="text-align:center; vertical-align:middle;">Frame 3</th> <th style="text-align:center; vertical-align:middle;">Frame 4</th> <th style="text-align:center; vertical-align:middle;">Frame 5</th> <th style="text-align:center; vertical-align:middle;">Frame 6</th> <th style="text-align:center; vertical-align:middle;">Frame 7</th> <th style="text-align:center; vertical-align:middle;">Frame 8</th> <th style="text-align:center; vertical-align:middle;">Frame 9</th> <th style="text-align:center; vertical-align:middle;">Frame 10</th><th style="text-align:center; vertical-align:middle;">Total</th></tr>&#39;;      
                 $i=1;
                while($row = mysql_fetch_assoc($sroll)) {
                echo &#39;<tr>&#39;;
                echo &#39;<td style="text-align:center; vertical-align:middle;">&#39;.$row[&#39;name&#39;].&#39;</td>&#39;; 
                    echo &#39;<input type="hidden" name="&#39;.$i.&#39;rname" value="&#39;.$row[&#39;name&#39;].&#39;"/>&#39;;
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="&#39;.$i.&#39;Frame1" id="&#39;.$i.&#39;f1" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;&#39;.$i.&#39;f1\&#39;,\&#39;&#39;.$i.&#39;f2\&#39;,\&#39;&#39;.$i.&#39;f3\&#39;,\&#39;&#39;.$i.&#39;f4\&#39;,\&#39;&#39;.$i.&#39;f5\&#39;,\&#39;&#39;.$i.&#39;f6\&#39;,\&#39;&#39;.$i.&#39;f7\&#39;,\&#39;&#39;.$i.&#39;f8\&#39;,\&#39;&#39;.$i.&#39;f9\&#39;,\&#39;&#39;.$i.&#39;f10\&#39;,\&#39;&#39;.$i.&#39;result\&#39;); calcTotal(\&#39;n3f1\&#39;,\&#39;n2f1\&#39;,\&#39;nf1\&#39;,\&#39;1f1\&#39;,\&#39;2f1\&#39;,\&#39;3f1\&#39;,\&#39;4f1\&#39;,\&#39;5f1\&#39;,\&#39;6f1\&#39;,\&#39;7f1\&#39;,\&#39;f1result\&#39;)"/></td>&#39;;          
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="&#39;.$i.&#39;Frame2" id="&#39;.$i.&#39;f2" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;&#39;.$i.&#39;f1\&#39;,\&#39;&#39;.$i.&#39;f2\&#39;,\&#39;&#39;.$i.&#39;f3\&#39;,\&#39;&#39;.$i.&#39;f4\&#39;,\&#39;&#39;.$i.&#39;f5\&#39;,\&#39;&#39;.$i.&#39;f6\&#39;,\&#39;&#39;.$i.&#39;f7\&#39;,\&#39;&#39;.$i.&#39;f8\&#39;,\&#39;&#39;.$i.&#39;f9\&#39;,\&#39;&#39;.$i.&#39;f10\&#39;,\&#39;&#39;.$i.&#39;result\&#39;); calcTotal(\&#39;n3f2\&#39;,\&#39;n2f2\&#39;,\&#39;nf2\&#39;,\&#39;1f2\&#39;,\&#39;2f2\&#39;,\&#39;3f2\&#39;,\&#39;4f2\&#39;,\&#39;5f2\&#39;,\&#39;6f2\&#39;,\&#39;7f2\&#39;,\&#39;f2result\&#39;)"/></td>&#39;;
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="&#39;.$i.&#39;Frame3" id="&#39;.$i.&#39;f3" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;&#39;.$i.&#39;f1\&#39;,\&#39;&#39;.$i.&#39;f2\&#39;,\&#39;&#39;.$i.&#39;f3\&#39;,\&#39;&#39;.$i.&#39;f4\&#39;,\&#39;&#39;.$i.&#39;f5\&#39;,\&#39;&#39;.$i.&#39;f6\&#39;,\&#39;&#39;.$i.&#39;f7\&#39;,\&#39;&#39;.$i.&#39;f8\&#39;,\&#39;&#39;.$i.&#39;f9\&#39;,\&#39;&#39;.$i.&#39;f10\&#39;,\&#39;&#39;.$i.&#39;result\&#39;); calcTotal(\&#39;n3f3\&#39;,\&#39;n2f3\&#39;,\&#39;nf3\&#39;,\&#39;1f3\&#39;,\&#39;2f3\&#39;,\&#39;3f3\&#39;,\&#39;4f3\&#39;,\&#39;5f3\&#39;,\&#39;6f3\&#39;,\&#39;7f3\&#39;,\&#39;f3result\&#39;)"/></td>&#39;;
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="&#39;.$i.&#39;Frame4" id="&#39;.$i.&#39;f4" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;&#39;.$i.&#39;f1\&#39;,\&#39;&#39;.$i.&#39;f2\&#39;,\&#39;&#39;.$i.&#39;f3\&#39;,\&#39;&#39;.$i.&#39;f4\&#39;,\&#39;&#39;.$i.&#39;f5\&#39;,\&#39;&#39;.$i.&#39;f6\&#39;,\&#39;&#39;.$i.&#39;f7\&#39;,\&#39;&#39;.$i.&#39;f8\&#39;,\&#39;&#39;.$i.&#39;f9\&#39;,\&#39;&#39;.$i.&#39;f10\&#39;,\&#39;&#39;.$i.&#39;result\&#39;); calcTotal(\&#39;n3f4\&#39;,\&#39;n2f4\&#39;,\&#39;nf4\&#39;,\&#39;1f4\&#39;,\&#39;2f4\&#39;,\&#39;3f4\&#39;,\&#39;4f4\&#39;,\&#39;5f4\&#39;,\&#39;6f4\&#39;,\&#39;7f4\&#39;,\&#39;f4result\&#39;)"/></td>&#39;;      
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="&#39;.$i.&#39;Frame5" id="&#39;.$i.&#39;f5" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;&#39;.$i.&#39;f1\&#39;,\&#39;&#39;.$i.&#39;f2\&#39;,\&#39;&#39;.$i.&#39;f3\&#39;,\&#39;&#39;.$i.&#39;f4\&#39;,\&#39;&#39;.$i.&#39;f5\&#39;,\&#39;&#39;.$i.&#39;f6\&#39;,\&#39;&#39;.$i.&#39;f7\&#39;,\&#39;&#39;.$i.&#39;f8\&#39;,\&#39;&#39;.$i.&#39;f9\&#39;,\&#39;&#39;.$i.&#39;f10\&#39;,\&#39;&#39;.$i.&#39;result\&#39;); calcTotal(\&#39;n3f5\&#39;,\&#39;n2f5\&#39;,\&#39;nf5\&#39;,\&#39;1f5\&#39;,\&#39;2f5\&#39;,\&#39;3f5\&#39;,\&#39;4f5\&#39;,\&#39;5f5\&#39;,\&#39;6f5\&#39;,\&#39;7f5\&#39;,\&#39;f5result\&#39;)"/></td>&#39;;
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="&#39;.$i.&#39;Frame6" id="&#39;.$i.&#39;f6" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;&#39;.$i.&#39;f1\&#39;,\&#39;&#39;.$i.&#39;f2\&#39;,\&#39;&#39;.$i.&#39;f3\&#39;,\&#39;&#39;.$i.&#39;f4\&#39;,\&#39;&#39;.$i.&#39;f5\&#39;,\&#39;&#39;.$i.&#39;f6\&#39;,\&#39;&#39;.$i.&#39;f7\&#39;,\&#39;&#39;.$i.&#39;f8\&#39;,\&#39;&#39;.$i.&#39;f9\&#39;,\&#39;&#39;.$i.&#39;f10\&#39;,\&#39;&#39;.$i.&#39;result\&#39;); calcTotal(\&#39;n3f6\&#39;,\&#39;n2f6\&#39;,\&#39;nf6\&#39;,\&#39;1f6\&#39;,\&#39;2f6\&#39;,\&#39;3f6\&#39;,\&#39;4f6\&#39;,\&#39;5f6\&#39;,\&#39;6f6\&#39;,\&#39;7f6\&#39;,\&#39;f6result\&#39;)"/></td>&#39;;
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="&#39;.$i.&#39;Frame7" id="&#39;.$i.&#39;f7" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;&#39;.$i.&#39;f1\&#39;,\&#39;&#39;.$i.&#39;f2\&#39;,\&#39;&#39;.$i.&#39;f3\&#39;,\&#39;&#39;.$i.&#39;f4\&#39;,\&#39;&#39;.$i.&#39;f5\&#39;,\&#39;&#39;.$i.&#39;f6\&#39;,\&#39;&#39;.$i.&#39;f7\&#39;,\&#39;&#39;.$i.&#39;f8\&#39;,\&#39;&#39;.$i.&#39;f9\&#39;,\&#39;&#39;.$i.&#39;f10\&#39;,\&#39;&#39;.$i.&#39;result\&#39;); calcTotal(\&#39;n3f7\&#39;,\&#39;n2f7\&#39;,\&#39;nf7\&#39;,\&#39;1f7\&#39;,\&#39;2f7\&#39;,\&#39;3f7\&#39;,\&#39;4f7\&#39;,\&#39;5f7\&#39;,\&#39;6f7\&#39;,\&#39;7f7\&#39;,\&#39;f7result\&#39;)"/></td>&#39;;
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="&#39;.$i.&#39;Frame8" id="&#39;.$i.&#39;f8" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;&#39;.$i.&#39;f1\&#39;,\&#39;&#39;.$i.&#39;f2\&#39;,\&#39;&#39;.$i.&#39;f3\&#39;,\&#39;&#39;.$i.&#39;f4\&#39;,\&#39;&#39;.$i.&#39;f5\&#39;,\&#39;&#39;.$i.&#39;f6\&#39;,\&#39;&#39;.$i.&#39;f7\&#39;,\&#39;&#39;.$i.&#39;f8\&#39;,\&#39;&#39;.$i.&#39;f9\&#39;,\&#39;&#39;.$i.&#39;f10\&#39;,\&#39;&#39;.$i.&#39;result\&#39;); calcTotal(\&#39;n3f8\&#39;,\&#39;n2f8\&#39;,\&#39;nf8\&#39;,\&#39;1f8\&#39;,\&#39;2f8\&#39;,\&#39;3f8\&#39;,\&#39;4f8\&#39;,\&#39;5f8\&#39;,\&#39;6f8\&#39;,\&#39;7f8\&#39;,\&#39;f8result\&#39;)"/></td>&#39;;  
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="&#39;.$i.&#39;Frame9" id="&#39;.$i.&#39;f9" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;&#39;.$i.&#39;f1\&#39;,\&#39;&#39;.$i.&#39;f2\&#39;,\&#39;&#39;.$i.&#39;f3\&#39;,\&#39;&#39;.$i.&#39;f4\&#39;,\&#39;&#39;.$i.&#39;f5\&#39;,\&#39;&#39;.$i.&#39;f6\&#39;,\&#39;&#39;.$i.&#39;f7\&#39;,\&#39;&#39;.$i.&#39;f8\&#39;,\&#39;&#39;.$i.&#39;f9\&#39;,\&#39;&#39;.$i.&#39;f10\&#39;,\&#39;&#39;.$i.&#39;result\&#39;); calcTotal(\&#39;n3f9\&#39;,\&#39;n2f9\&#39;,\&#39;nf9\&#39;,\&#39;1f9\&#39;,\&#39;2f9\&#39;,\&#39;3f9\&#39;,\&#39;4f9\&#39;,\&#39;5f9\&#39;,\&#39;6f9\&#39;,\&#39;7f9\&#39;,\&#39;f9result\&#39;)"/></td>&#39;;
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="&#39;.$i.&#39;Frame10" id="&#39;.$i.&#39;f10" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;&#39;.$i.&#39;f1\&#39;,\&#39;&#39;.$i.&#39;f2\&#39;,\&#39;&#39;.$i.&#39;f3\&#39;,\&#39;&#39;.$i.&#39;f4\&#39;,\&#39;&#39;.$i.&#39;f5\&#39;,\&#39;&#39;.$i.&#39;f6\&#39;,\&#39;&#39;.$i.&#39;f7\&#39;,\&#39;&#39;.$i.&#39;f8\&#39;,\&#39;&#39;.$i.&#39;f9\&#39;,\&#39;&#39;.$i.&#39;f10\&#39;,\&#39;&#39;.$i.&#39;result\&#39;); calcTotal(\&#39;n3f10\&#39;,\&#39;n2f10\&#39;,\&#39;nf10\&#39;,\&#39;1f10\&#39;,\&#39;2f10\&#39;,\&#39;3f10\&#39;,\&#39;4f10\&#39;,\&#39;5f10\&#39;,\&#39;6f10\&#39;,\&#39;7f10\&#39;,\&#39;f10result\&#39;)"/></td>&#39;;
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><div id="&#39;.$i.&#39;result"></div></td>&#39;;                    

                echo &#39;</tr>&#39;;
                $i++;
                }
                echo &#39;<tr>&#39;;
                echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="newname" maxlength="30"/></td>&#39;;        
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="newFrame1" id="nf1" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;nf1\&#39;,\&#39;nf2\&#39;,\&#39;nf3\&#39;,\&#39;nf4\&#39;,\&#39;nf5\&#39;,\&#39;nf6\&#39;,\&#39;nf7\&#39;,\&#39;nf8\&#39;,\&#39;nf9\&#39;,\&#39;nf10\&#39;,\&#39;nresult\&#39;); calcTotal(\&#39;n3f1\&#39;,\&#39;n2f1\&#39;,\&#39;nf1\&#39;,\&#39;1f1\&#39;,\&#39;2f1\&#39;,\&#39;3f1\&#39;,\&#39;4f1\&#39;,\&#39;5f1\&#39;,\&#39;6f1\&#39;,\&#39;7f1\&#39;,\&#39;f1result\&#39;)"/></td>&#39;; 
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="newFrame2" id="nf2" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;nf1\&#39;,\&#39;nf2\&#39;,\&#39;nf3\&#39;,\&#39;nf4\&#39;,\&#39;nf5\&#39;,\&#39;nf6\&#39;,\&#39;nf7\&#39;,\&#39;nf8\&#39;,\&#39;nf9\&#39;,\&#39;nf10\&#39;,\&#39;nresult\&#39;); calcTotal(\&#39;n3f2\&#39;,\&#39;n2f2\&#39;,\&#39;nf2\&#39;,\&#39;1f2\&#39;,\&#39;2f2\&#39;,\&#39;3f2\&#39;,\&#39;4f2\&#39;,\&#39;5f2\&#39;,\&#39;6f2\&#39;,\&#39;7f2\&#39;,\&#39;f2result\&#39;)"/></td>&#39;; 
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="newFrame3" id="nf3" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;nf1\&#39;,\&#39;nf2\&#39;,\&#39;nf3\&#39;,\&#39;nf4\&#39;,\&#39;nf5\&#39;,\&#39;nf6\&#39;,\&#39;nf7\&#39;,\&#39;nf8\&#39;,\&#39;nf9\&#39;,\&#39;nf10\&#39;,\&#39;nresult\&#39;); calcTotal(\&#39;n3f3\&#39;,\&#39;n2f3\&#39;,\&#39;nf3\&#39;,\&#39;1f3\&#39;,\&#39;2f3\&#39;,\&#39;3f3\&#39;,\&#39;4f3\&#39;,\&#39;5f3\&#39;,\&#39;6f3\&#39;,\&#39;7f3\&#39;,\&#39;f3result\&#39;)"/></td>&#39;; 
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="newFrame4" id="nf4" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;nf1\&#39;,\&#39;nf2\&#39;,\&#39;nf3\&#39;,\&#39;nf4\&#39;,\&#39;nf5\&#39;,\&#39;nf6\&#39;,\&#39;nf7\&#39;,\&#39;nf8\&#39;,\&#39;nf9\&#39;,\&#39;nf10\&#39;,\&#39;nresult\&#39;); calcTotal(\&#39;n3f4\&#39;,\&#39;n2f4\&#39;,\&#39;nf4\&#39;,\&#39;1f4\&#39;,\&#39;2f4\&#39;,\&#39;3f4\&#39;,\&#39;4f4\&#39;,\&#39;5f4\&#39;,\&#39;6f4\&#39;,\&#39;7f4\&#39;,\&#39;f4result\&#39;)"/></td>&#39;;     
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="newFrame5" id="nf5" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;nf1\&#39;,\&#39;nf2\&#39;,\&#39;nf3\&#39;,\&#39;nf4\&#39;,\&#39;nf5\&#39;,\&#39;nf6\&#39;,\&#39;nf7\&#39;,\&#39;nf8\&#39;,\&#39;nf9\&#39;,\&#39;nf10\&#39;,\&#39;nresult\&#39;); calcTotal(\&#39;n3f5\&#39;,\&#39;n2f5\&#39;,\&#39;nf5\&#39;,\&#39;1f5\&#39;,\&#39;2f5\&#39;,\&#39;3f5\&#39;,\&#39;4f5\&#39;,\&#39;5f5\&#39;,\&#39;6f5\&#39;,\&#39;7f5\&#39;,\&#39;f5result\&#39;)"/></td>&#39;; 
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="newFrame6" id="nf6" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;nf1\&#39;,\&#39;nf2\&#39;,\&#39;nf3\&#39;,\&#39;nf4\&#39;,\&#39;nf5\&#39;,\&#39;nf6\&#39;,\&#39;nf7\&#39;,\&#39;nf8\&#39;,\&#39;nf9\&#39;,\&#39;nf10\&#39;,\&#39;nresult\&#39;); calcTotal(\&#39;n3f6\&#39;,\&#39;n2f6\&#39;,\&#39;nf6\&#39;,\&#39;1f6\&#39;,\&#39;2f6\&#39;,\&#39;3f6\&#39;,\&#39;4f6\&#39;,\&#39;5f6\&#39;,\&#39;6f6\&#39;,\&#39;7f6\&#39;,\&#39;f6result\&#39;)"/></td>&#39;;     
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="newFrame7" id="nf7" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;nf1\&#39;,\&#39;nf2\&#39;,\&#39;nf3\&#39;,\&#39;nf4\&#39;,\&#39;nf5\&#39;,\&#39;nf6\&#39;,\&#39;nf7\&#39;,\&#39;nf8\&#39;,\&#39;nf9\&#39;,\&#39;nf10\&#39;,\&#39;nresult\&#39;); calcTotal(\&#39;n3f7\&#39;,\&#39;n2f7\&#39;,\&#39;nf7\&#39;,\&#39;1f7\&#39;,\&#39;2f7\&#39;,\&#39;3f7\&#39;,\&#39;4f7\&#39;,\&#39;5f7\&#39;,\&#39;6f7\&#39;,\&#39;7f7\&#39;,\&#39;f7result\&#39;)"/></td>&#39;;     
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="newFrame8" id="nf8" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;nf1\&#39;,\&#39;nf2\&#39;,\&#39;nf3\&#39;,\&#39;nf4\&#39;,\&#39;nf5\&#39;,\&#39;nf6\&#39;,\&#39;nf7\&#39;,\&#39;nf8\&#39;,\&#39;nf9\&#39;,\&#39;nf10\&#39;,\&#39;nresult\&#39;); calcTotal(\&#39;n3f8\&#39;,\&#39;n2f8\&#39;,\&#39;nf8\&#39;,\&#39;1f8\&#39;,\&#39;2f8\&#39;,\&#39;3f8\&#39;,\&#39;4f8\&#39;,\&#39;5f8\&#39;,\&#39;6f8\&#39;,\&#39;7f8\&#39;,\&#39;f8result\&#39;)"/></td>&#39;; 
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="newFrame9" id="nf9" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;nf1\&#39;,\&#39;nf2\&#39;,\&#39;nf3\&#39;,\&#39;nf4\&#39;,\&#39;nf5\&#39;,\&#39;nf6\&#39;,\&#39;nf7\&#39;,\&#39;nf8\&#39;,\&#39;nf9\&#39;,\&#39;nf10\&#39;,\&#39;nresult\&#39;); calcTotal(\&#39;n3f9\&#39;,\&#39;n2f9\&#39;,\&#39;nf9\&#39;,\&#39;1f9\&#39;,\&#39;2f9\&#39;,\&#39;3f9\&#39;,\&#39;4f9\&#39;,\&#39;5f9\&#39;,\&#39;6f9\&#39;,\&#39;7f9\&#39;,\&#39;f9result\&#39;)"/></td>&#39;;     
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="newFrame10" id="nf10" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;nf1\&#39;,\&#39;nf2\&#39;,\&#39;nf3\&#39;,\&#39;nf4\&#39;,\&#39;nf5\&#39;,\&#39;nf6\&#39;,\&#39;nf7\&#39;,\&#39;nf8\&#39;,\&#39;nf9\&#39;,\&#39;nf10\&#39;,\&#39;nresult\&#39;); calcTotal(\&#39;n3f10\&#39;,\&#39;n2f10\&#39;,\&#39;nf10\&#39;,\&#39;1f10\&#39;,\&#39;2f10\&#39;,\&#39;3f10\&#39;,\&#39;4f10\&#39;,\&#39;5f10\&#39;,\&#39;6f10\&#39;,\&#39;7f10\&#39;,\&#39;f10result\&#39;)"/></td>&#39;;
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><div id="nresult"></div></td>&#39;;

                echo &#39;</tr>&#39;;
                echo &#39;<tr>&#39;;
                echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new2name" maxlength="30"/></td>&#39;;       
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new2Frame1" id="n2f1" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;n2f1\&#39;,\&#39;n2f2\&#39;,\&#39;n2f3\&#39;,\&#39;n2f4\&#39;,\&#39;n2f5\&#39;,\&#39;n2f6\&#39;,\&#39;n2f7\&#39;,\&#39;n2f8\&#39;,\&#39;n2f9\&#39;,\&#39;n2f10\&#39;,\&#39;n2result\&#39;); calcTotal(\&#39;n3f1\&#39;,\&#39;n2f1\&#39;,\&#39;nf1\&#39;,\&#39;1f1\&#39;,\&#39;2f1\&#39;,\&#39;3f1\&#39;,\&#39;4f1\&#39;,\&#39;5f1\&#39;,\&#39;6f1\&#39;,\&#39;7f1\&#39;,\&#39;f1result\&#39;)"/></td>&#39;;    
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new2Frame2" id="n2f2" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;n2f1\&#39;,\&#39;n2f2\&#39;,\&#39;n2f3\&#39;,\&#39;n2f4\&#39;,\&#39;n2f5\&#39;,\&#39;n2f6\&#39;,\&#39;n2f7\&#39;,\&#39;n2f8\&#39;,\&#39;n2f9\&#39;,\&#39;n2f10\&#39;,\&#39;n2result\&#39;); calcTotal(\&#39;n3f2\&#39;,\&#39;n2f2\&#39;,\&#39;nf2\&#39;,\&#39;1f2\&#39;,\&#39;2f2\&#39;,\&#39;3f2\&#39;,\&#39;4f2\&#39;,\&#39;5f2\&#39;,\&#39;6f2\&#39;,\&#39;7f2\&#39;,\&#39;f2result\&#39;)"/></td>&#39;;    
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new2Frame3" id="n2f3" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;n2f1\&#39;,\&#39;n2f2\&#39;,\&#39;n2f3\&#39;,\&#39;n2f4\&#39;,\&#39;n2f5\&#39;,\&#39;n2f6\&#39;,\&#39;n2f7\&#39;,\&#39;n2f8\&#39;,\&#39;n2f9\&#39;,\&#39;n2f10\&#39;,\&#39;n2result\&#39;); calcTotal(\&#39;n3f3\&#39;,\&#39;n2f3\&#39;,\&#39;nf3\&#39;,\&#39;1f3\&#39;,\&#39;2f3\&#39;,\&#39;3f3\&#39;,\&#39;4f3\&#39;,\&#39;5f3\&#39;,\&#39;6f3\&#39;,\&#39;7f3\&#39;,\&#39;f3result\&#39;)"/></td>&#39;;    
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new2Frame4" id="n2f4" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;n2f1\&#39;,\&#39;n2f2\&#39;,\&#39;n2f3\&#39;,\&#39;n2f4\&#39;,\&#39;n2f5\&#39;,\&#39;n2f6\&#39;,\&#39;n2f7\&#39;,\&#39;n2f8\&#39;,\&#39;n2f9\&#39;,\&#39;n2f10\&#39;,\&#39;n2result\&#39;); calcTotal(\&#39;n3f4\&#39;,\&#39;n2f4\&#39;,\&#39;nf4\&#39;,\&#39;1f4\&#39;,\&#39;2f4\&#39;,\&#39;3f4\&#39;,\&#39;4f4\&#39;,\&#39;5f4\&#39;,\&#39;6f4\&#39;,\&#39;7f4\&#39;,\&#39;f4result\&#39;)"/></td>&#39;;        
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new2Frame5" id="n2f5" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;n2f1\&#39;,\&#39;n2f2\&#39;,\&#39;n2f3\&#39;,\&#39;n2f4\&#39;,\&#39;n2f5\&#39;,\&#39;n2f6\&#39;,\&#39;n2f7\&#39;,\&#39;n2f8\&#39;,\&#39;n2f9\&#39;,\&#39;n2f10\&#39;,\&#39;n2result\&#39;); calcTotal(\&#39;n3f5\&#39;,\&#39;n2f5\&#39;,\&#39;nf5\&#39;,\&#39;1f5\&#39;,\&#39;2f5\&#39;,\&#39;3f5\&#39;,\&#39;4f5\&#39;,\&#39;5f5\&#39;,\&#39;6f5\&#39;,\&#39;7f5\&#39;,\&#39;f5result\&#39;)"/></td>&#39;;    
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new2Frame6" id="n2f6" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;n2f1\&#39;,\&#39;n2f2\&#39;,\&#39;n2f3\&#39;,\&#39;n2f4\&#39;,\&#39;n2f5\&#39;,\&#39;n2f6\&#39;,\&#39;n2f7\&#39;,\&#39;n2f8\&#39;,\&#39;n2f9\&#39;,\&#39;n2f10\&#39;,\&#39;n2result\&#39;); calcTotal(\&#39;n3f6\&#39;,\&#39;n2f6\&#39;,\&#39;nf6\&#39;,\&#39;1f6\&#39;,\&#39;2f6\&#39;,\&#39;3f6\&#39;,\&#39;4f6\&#39;,\&#39;5f6\&#39;,\&#39;6f6\&#39;,\&#39;7f6\&#39;,\&#39;f6result\&#39;)"/></td>&#39;;        
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new2Frame7" id="n2f7" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;n2f1\&#39;,\&#39;n2f2\&#39;,\&#39;n2f3\&#39;,\&#39;n2f4\&#39;,\&#39;n2f5\&#39;,\&#39;n2f6\&#39;,\&#39;n2f7\&#39;,\&#39;n2f8\&#39;,\&#39;n2f9\&#39;,\&#39;n2f10\&#39;,\&#39;n2result\&#39;); calcTotal(\&#39;n3f7\&#39;,\&#39;n2f7\&#39;,\&#39;nf7\&#39;,\&#39;1f7\&#39;,\&#39;2f7\&#39;,\&#39;3f7\&#39;,\&#39;4f7\&#39;,\&#39;5f7\&#39;,\&#39;6f7\&#39;,\&#39;7f7\&#39;,\&#39;f7result\&#39;)"/></td>&#39;;        
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new2Frame8" id="n2f8" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;n2f1\&#39;,\&#39;n2f2\&#39;,\&#39;n2f3\&#39;,\&#39;n2f4\&#39;,\&#39;n2f5\&#39;,\&#39;n2f6\&#39;,\&#39;n2f7\&#39;,\&#39;n2f8\&#39;,\&#39;n2f9\&#39;,\&#39;n2f10\&#39;,\&#39;n2result\&#39;); calcTotal(\&#39;n3f8\&#39;,\&#39;n2f8\&#39;,\&#39;nf8\&#39;,\&#39;1f8\&#39;,\&#39;2f8\&#39;,\&#39;3f8\&#39;,\&#39;4f8\&#39;,\&#39;5f8\&#39;,\&#39;6f8\&#39;,\&#39;7f8\&#39;,\&#39;f8result\&#39;)"/></td>&#39;;    
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new2Frame9" id="n2f9" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;n2f1\&#39;,\&#39;n2f2\&#39;,\&#39;n2f3\&#39;,\&#39;n2f4\&#39;,\&#39;n2f5\&#39;,\&#39;n2f6\&#39;,\&#39;n2f7\&#39;,\&#39;n2f8\&#39;,\&#39;n2f9\&#39;,\&#39;n2f10\&#39;,\&#39;n2result\&#39;); calcTotal(\&#39;n3f9\&#39;,\&#39;n2f9\&#39;,\&#39;nf9\&#39;,\&#39;1f9\&#39;,\&#39;2f9\&#39;,\&#39;3f9\&#39;,\&#39;4f9\&#39;,\&#39;5f9\&#39;,\&#39;6f9\&#39;,\&#39;7f9\&#39;,\&#39;f9result\&#39;)"/></td>&#39;;    
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new2Frame10" id="n2f10" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;n2f1\&#39;,\&#39;n2f2\&#39;,\&#39;n2f3\&#39;,\&#39;n2f4\&#39;,\&#39;n2f5\&#39;,\&#39;n2f6\&#39;,\&#39;n2f7\&#39;,\&#39;n2f8\&#39;,\&#39;n2f9\&#39;,\&#39;n2f10\&#39;,\&#39;n2result\&#39;); calcTotal(\&#39;n3f10\&#39;,\&#39;n2f10\&#39;,\&#39;nf10\&#39;,\&#39;1f10\&#39;,\&#39;2f10\&#39;,\&#39;3f10\&#39;,\&#39;4f10\&#39;,\&#39;5f10\&#39;,\&#39;6f10\&#39;,\&#39;7f10\&#39;,\&#39;f10result\&#39;)"/></td>&#39;;
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><div id="n2result"></div></td>&#39;;

                echo &#39;</tr>&#39;;
                echo &#39;<tr>&#39;;
                echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new3name" maxlength="30"/></td>&#39;;       
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new3Frame1" id="n3f1" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;n3f1\&#39;,\&#39;n3f2\&#39;,\&#39;n3f3\&#39;,\&#39;n3f4\&#39;,\&#39;n3f5\&#39;,\&#39;n3f6\&#39;,\&#39;n3f7\&#39;,\&#39;n3f8\&#39;,\&#39;n3f9\&#39;,\&#39;n3f10\&#39;,\&#39;n3result\&#39;); calcTotal(\&#39;n3f1\&#39;,\&#39;n2f1\&#39;,\&#39;nf1\&#39;,\&#39;1f1\&#39;,\&#39;2f1\&#39;,\&#39;3f1\&#39;,\&#39;4f1\&#39;,\&#39;5f1\&#39;,\&#39;6f1\&#39;,\&#39;7f1\&#39;,\&#39;f1result\&#39;)"/></td>&#39;;    
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new3Frame2" id="n3f2" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;n3f1\&#39;,\&#39;n3f2\&#39;,\&#39;n3f3\&#39;,\&#39;n3f4\&#39;,\&#39;n3f5\&#39;,\&#39;n3f6\&#39;,\&#39;n3f7\&#39;,\&#39;n3f8\&#39;,\&#39;n3f9\&#39;,\&#39;n3f10\&#39;,\&#39;n3result\&#39;); calcTotal(\&#39;n3f2\&#39;,\&#39;n2f2\&#39;,\&#39;nf2\&#39;,\&#39;1f2\&#39;,\&#39;2f2\&#39;,\&#39;3f2\&#39;,\&#39;4f2\&#39;,\&#39;5f2\&#39;,\&#39;6f2\&#39;,\&#39;7f2\&#39;,\&#39;f2result\&#39;)"/></td>&#39;;    
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new3Frame3" id="n3f3" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;n3f1\&#39;,\&#39;n3f2\&#39;,\&#39;n3f3\&#39;,\&#39;n3f4\&#39;,\&#39;n3f5\&#39;,\&#39;n3f6\&#39;,\&#39;n3f7\&#39;,\&#39;n3f8\&#39;,\&#39;n3f9\&#39;,\&#39;n3f10\&#39;,\&#39;n3result\&#39;); calcTotal(\&#39;n3f3\&#39;,\&#39;n2f3\&#39;,\&#39;nf3\&#39;,\&#39;1f3\&#39;,\&#39;2f3\&#39;,\&#39;3f3\&#39;,\&#39;4f3\&#39;,\&#39;5f3\&#39;,\&#39;6f3\&#39;,\&#39;7f3\&#39;,\&#39;f3result\&#39;)"/></td>&#39;;    
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new3Frame4" id="n3f4" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;n3f1\&#39;,\&#39;n3f2\&#39;,\&#39;n3f3\&#39;,\&#39;n3f4\&#39;,\&#39;n3f5\&#39;,\&#39;n3f6\&#39;,\&#39;n3f7\&#39;,\&#39;n3f8\&#39;,\&#39;n3f9\&#39;,\&#39;n3f10\&#39;,\&#39;n3result\&#39;); calcTotal(\&#39;n3f4\&#39;,\&#39;n2f4\&#39;,\&#39;nf4\&#39;,\&#39;1f4\&#39;,\&#39;2f4\&#39;,\&#39;3f4\&#39;,\&#39;4f4\&#39;,\&#39;5f4\&#39;,\&#39;6f4\&#39;,\&#39;7f4\&#39;,\&#39;f4result\&#39;)"/></td>&#39;;        
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new3Frame5" id="n3f5" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;n3f1\&#39;,\&#39;n3f2\&#39;,\&#39;n3f3\&#39;,\&#39;n3f4\&#39;,\&#39;n3f5\&#39;,\&#39;n3f6\&#39;,\&#39;n3f7\&#39;,\&#39;n3f8\&#39;,\&#39;n3f9\&#39;,\&#39;n3f10\&#39;,\&#39;n3result\&#39;); calcTotal(\&#39;n3f5\&#39;,\&#39;n2f5\&#39;,\&#39;nf5\&#39;,\&#39;1f5\&#39;,\&#39;2f5\&#39;,\&#39;3f5\&#39;,\&#39;4f5\&#39;,\&#39;5f5\&#39;,\&#39;6f5\&#39;,\&#39;7f5\&#39;,\&#39;f5result\&#39;)"/></td>&#39;;    
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new3Frame6" id="n3f6" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;n3f1\&#39;,\&#39;n3f2\&#39;,\&#39;n3f3\&#39;,\&#39;n3f4\&#39;,\&#39;n3f5\&#39;,\&#39;n3f6\&#39;,\&#39;n3f7\&#39;,\&#39;n3f8\&#39;,\&#39;n3f9\&#39;,\&#39;n3f10\&#39;,\&#39;n3result\&#39;); calcTotal(\&#39;n3f6\&#39;,\&#39;n2f6\&#39;,\&#39;nf6\&#39;,\&#39;1f6\&#39;,\&#39;2f6\&#39;,\&#39;3f6\&#39;,\&#39;4f6\&#39;,\&#39;5f6\&#39;,\&#39;6f6\&#39;,\&#39;7f6\&#39;,\&#39;f6result\&#39;)"/></td>&#39;;        
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new3Frame7" id="n3f7" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;n3f1\&#39;,\&#39;n3f2\&#39;,\&#39;n3f3\&#39;,\&#39;n3f4\&#39;,\&#39;n3f5\&#39;,\&#39;n3f6\&#39;,\&#39;n3f7\&#39;,\&#39;n3f8\&#39;,\&#39;n3f9\&#39;,\&#39;n3f10\&#39;,\&#39;n3result\&#39;); calcTotal(\&#39;n3f7\&#39;,\&#39;n2f7\&#39;,\&#39;nf7\&#39;,\&#39;1f7\&#39;,\&#39;2f7\&#39;,\&#39;3f7\&#39;,\&#39;4f7\&#39;,\&#39;5f7\&#39;,\&#39;6f7\&#39;,\&#39;7f7\&#39;,\&#39;f7result\&#39;)"/></td>&#39;;        
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new3Frame8" id="n3f8" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;n3f1\&#39;,\&#39;n3f2\&#39;,\&#39;n3f3\&#39;,\&#39;n3f4\&#39;,\&#39;n3f5\&#39;,\&#39;n3f6\&#39;,\&#39;n3f7\&#39;,\&#39;n3f8\&#39;,\&#39;n3f9\&#39;,\&#39;n3f10\&#39;,\&#39;n3result\&#39;); calcTotal(\&#39;n3f8\&#39;,\&#39;n2f8\&#39;,\&#39;nf8\&#39;,\&#39;1f8\&#39;,\&#39;2f8\&#39;,\&#39;3f8\&#39;,\&#39;4f8\&#39;,\&#39;5f8\&#39;,\&#39;6f8\&#39;,\&#39;7f8\&#39;,\&#39;f8result\&#39;)"/></td>&#39;;    
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new3Frame9" id="n3f9" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;n3f1\&#39;,\&#39;n3f2\&#39;,\&#39;n3f3\&#39;,\&#39;n3f4\&#39;,\&#39;n3f5\&#39;,\&#39;n3f6\&#39;,\&#39;n3f7\&#39;,\&#39;n3f8\&#39;,\&#39;n3f9\&#39;,\&#39;n3f10\&#39;,\&#39;n3result\&#39;); calcTotal(\&#39;n3f9\&#39;,\&#39;n2f9\&#39;,\&#39;nf9\&#39;,\&#39;1f9\&#39;,\&#39;2f9\&#39;,\&#39;3f9\&#39;,\&#39;4f9\&#39;,\&#39;5f9\&#39;,\&#39;6f9\&#39;,\&#39;7f9\&#39;,\&#39;f9result\&#39;)"/></td>&#39;;        
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><input class="span12" type="text" name="new3Frame10" id="n3f10" maxlength="2" size="2" onkeypress="validate(event)" onChange="calcTotal(\&#39;n3f1\&#39;,\&#39;n3f2\&#39;,\&#39;n3f3\&#39;,\&#39;n3f4\&#39;,\&#39;n3f5\&#39;,\&#39;n3f6\&#39;,\&#39;n3f7\&#39;,\&#39;n3f8\&#39;,\&#39;n3f9\&#39;,\&#39;n3f10\&#39;,\&#39;n3result\&#39;); calcTotal(\&#39;n3f10\&#39;,\&#39;n2f10\&#39;,\&#39;nf10\&#39;,\&#39;1f10\&#39;,\&#39;2f10\&#39;,\&#39;3f10\&#39;,\&#39;4f10\&#39;,\&#39;5f10\&#39;,\&#39;6f10\&#39;,\&#39;7f10\&#39;,\&#39;f10result\&#39;)"/></td>&#39;;   
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><div id="n3result"></div></td>&#39;;

                echo &#39;</tr>&#39;;
                echo &#39;<tr>&#39;;
                echo &#39;<td style="text-align:center; vertical-align:middle;">Total</td>&#39;;        
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><div id="f1result"></div></td>&#39;;   
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><div id="f2result"></div></td>&#39;;   
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><div id="f3result"></div></td>&#39;;   
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><div id="f4result"></div></td>&#39;;   
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><div id="f5result"></div></td>&#39;;   
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><div id="f6result"></div></td>&#39;;       
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><div id="f7result"></div></td>&#39;;   
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><div id="f8result"></div></td>&#39;;   
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><div id="f9result"></div></td>&#39;;   
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><div id="f10result"></div></td>&#39;;  
                 echo &#39;<td style="text-align:center; vertical-align:middle;"><div id="totalresult"></div></td>&#39;;                    

                echo &#39;</tr>&#39;;

                 echo &#39;</table>&#39;;
                    echo &#39;<input class="btn btn-primary" type="submit" name="addscore" value="Add Scores with Extras"> &#39;;
                    echo &#39;<input class="btn btn-primary" type="submit" name="addscore2" value="Add Scores without Extras">&#39;;
                echo &#39;</form>&#39;; 
Code source n°309
Code-source en php proposé par Anonymous
 
 0