title: loop through radio button, function doesnt work
body: <p>Not sure why this function wont start. Checked it, read a lot on SO, nothing... 
  I'm sure there is very small mistake somewhere, where i cant spot..</p>
  
  <pre><code>&lt;form id="order"&gt;
      &lt;table&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  What type of pica would you like?&lt;br&gt;
                  Vegetarian, £6.50 &lt;input type="radio" name="pica" onclick="calcul();" value="vegetarian"&gt;&lt;br&gt;
                  Meat Lover, £7.20 &lt;input type="radio" name="pica" onclick="calcul();" value="meatLover"&gt;&lt;br&gt;
                  Hawaian, £5.5 &lt;input type="radio" name="pica" onclick="calcul();" value="hawaian"&gt;
                  &lt;br&gt;&lt;br&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/form&gt;
  
  var picaPrice = new Array();
      picaPrice['vegetarian']=6.5;
      picaPrice['meatLover']=7.2;
      picaPrice['hawaian']=5.5;
  
      function calcul(){
          var pprice = 0;
          var selectedPica = document.getElementsByName('pica');
          for(var i=0; i&lt;selectedPica.length; i++){
              if(selectedPica[i].checked) {
                  alert('selected');
              }
              else { alert('not selected') }
          }
  
      }
  </code></pre>
  
  <p>Done. Thank you for your help</p>