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