title: Change Value Of A Field On Submit Using Javascript
body: <p>I would like to add some JavaScript to do the following.</p>
  
  <p>I would have 3 fields like this.</p>
  
  <pre><code>&lt;input type="text" name="a" /&gt;
  &lt;input type="text" name="b" /&gt;
  &lt;input type="hidden" name="c" /&gt;
  </code></pre>
  
  <p>say if I entered 100 in the first field and 19 in the second field.</p>
  
  <p>it would divide 100 by 19 and round it up to no decimal places, and then replace the value of the third hidden field by the answer, so in the case it would be (100/19) 5.26... rounded up to 6</p>
  
  <p>however I am not sure how to actually implement this.</p>