title: impossible to give focus to an input
body: <p>I need your help here, because I'm out of idea </p>
  
  <p>I have the following HTML5 code </p>
  
  <pre><code>&lt;form&gt;
      &lt;table class="main"&gt;
              &lt;tr&gt;
                      &lt;td&gt;Volume&lt;/td&gt;
                      &lt;td&gt;&lt;input type="text" id="Q1" onblur="updateQ(Q1)" autofocus /&gt;&lt;/td&gt;
                      &lt;td&gt;ml&amp;nbsp;&lt;/td&gt;
                      &lt;td&gt;&lt;input type="text" id="Q2" onblur="updateQ(Q2)" /&gt;&lt;/td&gt;
                      &lt;td&gt;ml&amp;nbsp;&lt;/td&gt;
                      &lt;td&gt;&lt;input type="text" id="Qt" onblur="updateQ(Qt)" /&gt;&lt;/td&gt;
                      &lt;td&gt;ml&amp;nbsp;&lt;/td&gt;
              &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and the following javascript function</p>
  
  <pre><code>function updateQ(ident) {
      var valeur = ident.value;
      var inputId = ident.id.toString();
      if (isNaN(valeur)) {
          ident.value = "";
          document.getElementById(inputId).focus();
      }
  }
  </code></pre>
  
  <p>When the page is loaded, the first &lt; input > get the focus.
  I want to check if the user is entering only number, so "onblur" I call the function, which check the content.
  If it's not a number, I remove the value and I try to give back the focus to the &lt; input ></p>
  
  <p>It doesn't work ! </p>
  
  <p>Impossible to give back the focus, the second input have it and it never goes back to the first one
  I don't see any error in the Javascript console, and the rest of the script works nicely. 
  Even giving the real id ("Q1") doesn't work ...</p>
  
  <p>However, out of the function, giving the focus to another &lt; input > works nicely </p>
  
  <p>Any idea ?</p>
  
  <p>Thanks in advance for your help</p>
  
  <p>ericc</p>