title: How to set the focus on a hidden textbox field using JavaScript?
body: <p>How can I set the focus on a hidden textbox element?</p>
  
  <p><strong>I tried this:</strong></p>
  
  <pre class="lang-js prettyprint-override"><code>document.getElementById("textControl_fd_component_JSON_TASK_NStext64").focus(); 
  </code></pre>
  
  <p>But, this does not work here. As <code>alert(document.activeElement.id);</code> returns <code>null</code> in this case. </p>
  
  <p>If I make this field visible, the above script works fine. Any ideas where I am getting it wrong?</p>