title: Javascript math form fields
body: <p>I'm building a form with some javascript math functions and can't seem to get the 3rd field to work as I want</p>
  
  <ul>
  <li>When you enter <strong>100</strong> in the blue price box field 'How much would you like to be paid for selling this bottle'</li>
  <li>Then 25 is put into the next field which is correct.</li>
  <li>but the SELL PRICE INCLUDING TAX field isn't working, It should take 100 then add the next field so in this case 125 then multiply it by 1.125. To give the answer $140.63</li>
  </ul>
  
  <p><a href="https://www.cloudwine.com.au/list-private-wine" rel="nofollow noreferrer">https://www.cloudwine.com.au/list-private-wine</a></p>
  
  <hr>
  
  <p>FORM FIELDS</p>
  
  <pre><code>&lt;label for="CAT_Custom_15"&gt;&lt;b&gt;How much would you like to be paid for selling this bottle?&lt;/b&gt;&lt;/label&gt;
  &lt;input type="text" maxlength="4000" onchange="output()" name="CAT_Custom_15" id="CAT_Custom_15" class="cat_textbox price bborder" /&gt;
  
  &lt;label for="CAT_Custom_14"&gt;Cloudwine Commission 25%&lt;/label&gt;
  &lt;input type="text" maxlength="4000" name="CAT_Custom_14" id="CAT_Custom_14" class="cat_textbox price" readonly="readonly" /&gt;
  
  &lt;label for="CAT_Custom_13"&gt;SELL PRICE INCLUDING TAX&lt;/label&gt;
  &lt;input type="text" maxlength="4000" name="CAT_Custom_13" id="CAT_Custom_13" class="cat_textbox price" readonly="readonly" /&gt;
  </code></pre>
  
  <hr>
  
  <p>JAVASCRIPT</p>
  
  <pre><code>function output(){
  
      var startPriceV2 = jQuery( "#CAT_Custom_15" ).val();
  
      jQuery( '#CAT_Custom_14' ).val( parseInt(startPriceV2) * (0.25) ).toFixed(2);
  
      var cloudCom = jQuery( '#CAT_Custom_14' ).val();            
  
      jQuery( '#CAT_Custom_13' ).val( parseInt(startPriceV2) + parseInt(cloudCom) * (1.125) ).toFixed(2);
  
  }
  </code></pre>