title: Javascript: ReferenceError - On highlighting text using select() and focus()
body: <p>What is problem with this Snippet? </p>
  
  <p>Why it is not working?</p>
  
  <pre><code>&lt;input type="text" id="zuhu" value="Gigubaba 2015" onClick="selectTheText(this)" /&gt;
  
  function selectTheText(textField)  
  {
    alert(textField);
    textField.focus();
    textField.select(); 
  }
  </code></pre>
  
  <p>Why it says:</p>
  
  <pre><code>ReferenceError: selectTheText is not defined
  {"error": "Please use POST request"}
  </code></pre>
  
  <p>Fiddle: <a href="https://jsfiddle.net/0c2g5a7g/" rel="nofollow">https://jsfiddle.net/0c2g5a7g/</a></p>