title: how will i get backing bean value in java script on click of command button
body: <p>Can you please help me out in doing this? 
  I am trying to get value from backing bean in my javascript on click of the command button.</p>
  
  <p>this is my jsf command button</p>
  
  <pre><code>   &lt;h:commandButton id="me" value="test" action="#{ques.conversiontostring}"
           onclick="mystring()"/&gt;
  </code></pre>
  
  <p>this my javascript function</p>
  
  <pre><code>   function mystring()
      {
      var mystring = window.document.getElementById("form:me").click(); 
      alert(mystring);
  
      }
  </code></pre>
  
  <p>my bean returns a string that i am storing in mystring variable, but when i alert i get null value.
  that would be great if someone helps in doing that. Thanks in advance.</p>