title: Get value text from p:inputText javascript
body: <p>I'm trying something simple, just to get the text value inside a <code>p:inputText</code> thought Javascript, but I`m not getting it.
  Perhaps it's a different procedure with Primefaces, since if I don't use that, I don't encounter the problem.</p>
  
  <p><strong>My code:</strong></p>
  
  <pre><code>&lt;p:inputText value="any text" widgetVar="youtlink" &gt;&lt;/p:inputText&gt;
          &lt;p:commandButton value="Search"    onclick="loadPlayer();" icon="ui-icon-search" /&gt;  
  
  
  &lt;script type="text/javascript"&gt;
      function loadPlayer() {
          alert(youtlink.text);
      }
  &lt;/script&gt;
  </code></pre>
  
  <p>I have tried also with JQuery but also no success.</p>
  
  <p><strong>Rendered view:</strong></p>
  
  <pre><code>&lt;form id="editlFrm" enctype="application/x-www-form-urlencoded" method="post"
  name="editlFrm"&gt;
      &lt;input id="editlFrm:j_id_7" class="ui-inputfield ui-inputtext ui-widget ui-state-default ui-corner-all"
      type="text" value="assd" name="editlFrm:j_id_7" role="textbox" aria-disabled="false"
      aria-readonly="false" aria-multiline="false"&gt;
      &lt;button id="editlFrm:j_id_8" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-left"
      type="submit" onclick="loadPlayer();;PrimeFaces.ab({source:'editlFrm:j_id_8'});return false;"
      name="editlFrm:j_id_8" role="button" aria-disabled="false"&gt;
  </code></pre>