title: Pass javascript Word Count variable value as hidden field value
body: <p>I have this simple page:
  <a href="http://jsfiddle.net/20140228/2cjw9h9n/1/" rel="nofollow noreferrer">http://jsfiddle.net/20140228/2cjw9h9n/1/</a></p>
  
  <p>It uses this WordCount code as a starting point:
  <a href="http://jsfiddle.net/deepumohanp/jZeKu/" rel="nofollow noreferrer">http://jsfiddle.net/deepumohanp/jZeKu/</a></p>
  
  <p>But is much more basic, containing only the Word Count part of the code.</p>
  
  <p>I need to pass the value of the wordCount Javascript variable to the "varCount" hidden form field variable.</p>
  
  <p>I have looked at this page:
  <a href="https://stackoverflow.com/questions/7764154/pass-a-javascript-variable-value-into-input-type-hidden-value">Pass a javascript variable value into input type hidden value</a></p>
  
  <p>But I can't work out how to implement the suggestions from the page into my page, as my Javascript understanding is rather basic!</p>
  
  <p>I suppose it would have to include something like:</p>
  
  <pre><code>document.getElementById('varCount').value = ???;
  </code></pre>
  
  <p>How would I achieve this?</p>