title: Render Price in external Div
body: <p>I have found a code to display the final price based on some selections from a form imputs (checkbox) affecting the final price. I want also it to affect an external div with text on it. Is a huge fixed element I've created displaying "Final Cost" and I also want this to render the final price by changing the <code>getElementByID</code> and nothing happened. Could you help me to solve this?</p>
  
  <p><strong>I want also .priceText1 also to be affected:)</strong></p>
  
  <p>Actual code is</p>
  
  <p>HTML</p>
  
  <pre><code> &lt;form action="" id="theForm"&gt;
      &lt;fieldset&gt;
          &lt;legend&gt;
              Products
          &lt;/legend&gt;
          &lt;label&gt;
              &lt;input name="product" value="12.95" type="checkbox" id="p1" onclick="totalIt()"/&gt;
              Candy $12.95
          &lt;/label&gt;
          &lt;label&gt;
              &lt;input name="product" value="5.99" type="checkbox" id="p2" onclick="totalIt()"/&gt;
              Burger $5.99
          &lt;/label&gt;
          &lt;label&gt;
              &lt;input name="product" value="1.99" type="checkbox" id="p3" onclick="totalIt()"/&gt;
              Coke $1.99
          &lt;/label&gt;
          &lt;label&gt;
              Total 
              &lt;input value="$0.00" readonly="readonly" type="text" id="total"/&gt;
          &lt;/label&gt;
      &lt;/fieldset&gt;
      &lt;input value="Submit" type="submit"/&gt;
      &lt;input value="Reset" type="reset"/&gt;
  &lt;/form&gt;
  
  &lt;div class="priceWrapper"&gt;
              &lt;h3 class="priceText1"&gt;$0.00&lt;/h3&gt;
              &lt;h3 class="priceText2"&gt;Final Cost&lt;/h3&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>JS</p>
  
  <pre><code>function totalIt() {
      var input = document.getElementsByName("product");
      var total = 0;
      for (var i = 0; i &lt; input.length; i++) {
          if (input[i].checked) {
            total += parseFloat(input[i].value);
          }
      }
  
      document.getElementById("total").value = "$" + total.toFixed(2);
  }
  </code></pre>