title: javascript focus() isn't focusing
body: <p>Regular text field, user enters a string. Test whether a) there's something in the input, b) that there's no whitespace in the input, and c)is integers only, no other characters.
  Then the submit button.
  You'll note that I'm not using html behavior, there's no onclick in the input, strict Content/Presentation/Behavior separation.</p>
  
  <p>My HTML:</p>
  
  <pre><code>&lt;form name="basicText" id="basicText" action=""&gt;
  &lt;p&gt;Enter any ol' integer: 
  &lt;input type="text" id="inputBox" name="inputBox" size="14"/&gt;    
  &lt;input value = "Next...?" type="submit" id="mySubmitBtn" name="mySubmitBtn"/&gt;
  &lt;/p&gt;
  &lt;/form&gt;
  &lt;script src="js/w1bscript.js" type="text/javascript"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>Note also that the external javascript file is added at the end of the  so all elements can load (not worrying about onload right now).</p>
  
  <p>The JavaScript:</p>
  
  <pre><code>var myButton1 = document.getElementById("mySubmitBtn");
  var myForm1 = document.getElementById("basicText");
  var myTextBox = myForm1.inputBox;
  
  function submitPress() {
   if(myTextBox.value.length == 0) {
      alert("You didn't enter anything! Once more time, with feeling...")
      basicText.focus();
      basicText.select();
   } else if(/\s/.test(myTextBox.value)) {
      alert("Eh... No spaces. Just integers. Try again...");
      basicText.focus();
      basicText.select();
    } else if (isNaN(myTextBox.value)==true) {
      alert("Eh... Gonna need you to enter ONLY digits this time. kthnx.");
      basicText.focus();
      basicText.select();
   } else {
      // The textbox isn't empty, and there's no spaces. Good.
      alert("you've passed the test!")
    }
  }
  myButton1.addEventListener('click', submitPress, false);
  </code></pre>
  
  <p>When I enter an incorrect input, the logic works, but the cursor isn't focusing back to the text box, no matter what browser I use.</p>
  
  <p>Fiddle: <a href="http://jsfiddle.net/2CNeG/" rel="noreferrer">http://jsfiddle.net/2CNeG/</a></p>
  
  <p>Thank you,
  Don</p>