title: switch statement javascript
body: <p>I have searched quite awhile for this, but still I am none-the-wiser. I am trying to do a simple calculator for a website which calculates prices based on type of material. I can't seem to get it working. It keeps stepping straight to the default case of the switch statement below.</p>
  
  <pre><code>&lt;div class="form-group"&gt;
  &lt;div class="btn-group" data-toggle="buttons" class="col-lg-3 col-lg-offset-10"&gt;
              &lt;label class="btn btn-default **active**"&gt;
              &lt;input type="radio" name="inputWalls" id="inputWalls" value="block" checked&gt;Block&lt;/label&gt;
              &lt;label class="btn btn-default"&gt;
              &lt;input type="radio" name="inputWalls" id="inputWalls" value="brick"&gt;Brick &lt;/label&gt;
              &lt;label class="btn btn-default"&gt;
              &lt;input type="radio" name="inputWalls" id="inputWalls" value="stone"&gt;Stone &lt;/label&gt;
  </code></pre>
  
  <p>
    </p>
  
  <p>JAVASCRIPT</p>
  
  <pre><code>function quote(){
        var blockPrice = 0;
        var brickPrice = 0;
        var stonePrice = 0;
        var myWidth =  parseFloat(document.getElementById("widthInput").value);
        var myHeight = parseFloat(document.getElementById("heightInput").value);
        var radioButtons = document.getElementsByName("inputWalls");
        var totalArea = myWidth + myHeight;
  
      switch(radioButtons){
      case "block" :
  
          blockPrice = totalArea * 1.90;
          alert(blockPrice);
          break;
  
      case "brick" :
      {
          brickPrice = totalArea * 3.80;
          alert(brickPrice);
          break;
      }
      case "stone" :
      {
          stonePrice = totalArea * 4.90;
          alert(stonePrice);
          break;
      }
      default :
        alert('you have not selected material');
    }
  }
  </code></pre>