title: how to use javascript to get jsf h:outputText value?
body: <p>I have a button has action which can set myBackingBean.myString, and onclick event calls js method to alert that value. I just want to get the value of myString from backing bean by using javascript.</p>
  
  <p>I have a hidden output which has value from backing bean:</p>
  
  <pre><code>h:outputText id="myOutput" rendered="false" value="#{myBackingBean.myString}" 
  </code></pre>
  
  <p>then I need to alert this value in javascript fxn which triggered by a button:</p>
  
  <pre><code>function myFunction() {
  
  var outPut= document.getElementById("myForm:myOutput").value;
  
  ...
  
  }
  </code></pre>
  
  <p>but i got <code>Object required</code> error. How can i fix this?
  thanks in advance.</p>