title: Setting the value of h:outputText using Javascript
body: <p>I have a JSF output text as shown below:</p>
  
  <pre><code>&lt;h:outputText id="totalCount" value="#{myBean.totalCount}" /&gt;
  </code></pre>
  
  <p>And within my javascript- which is being called from a h:selectOneMenu, I am trying to calculate the count and set it.</p>
  
  <pre><code>var total = &lt;some calculation is done&gt;;
  document.getElementById("myForm:totalCount").value=total;
  </code></pre>
  
  <p>I verified that the value was being set by adding an alert, but this was not reflecting in the page. Further noticed that outputtext was being rendered as a SPAN HTML tag.</p>
  
  <p>So, will it not work in a Javascipt? Any suggestions?</p>
  
  <p>Thanks for anyone who can help me. </p>