title: Greybox: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1474660/javascript-visibility-error-in-internet-explorer-when-setting-focus-on-an-input">JavaScript: Visibility error in Internet Explorer when setting focus on an input element</a>  </p>
  </blockquote>
  
  
  
  <p>I have a page that loads within a greybox. I set the focus with <code>document.getElementById("textfield").focus()</code> - this works fine when calling the page directly.</p>
  
  <p>But when loaded in a greybox, setting the focus on the onload() event returns:</p>
  
  <blockquote>
    <p>Can't move focus to the control because it is invisible, not enabled,
    or of a type that does not accept the focus</p>
  </blockquote>
  
  <p>Calling it later works fine.</p>
  
  <p>Any ideas?</p>
  
  <p>Thanks!</p>