title: Putting focus on a textbox in onchange event
body: <p>I am trying to get it so that when a certain value is put into a textbox, the focus will stay on the textbox(and an alert will be shown in production). I am trying to get this to work in Firefox 3.5.7 with no luck. </p>
  
  <p>How can I make it so when a textbox is a certain value at <code>onchange</code> that it will stay focused/refocus on the textbox?</p>
  
  <p>Live example is at <a href="http://jsbin.com/ipina" rel="nofollow noreferrer">http://jsbin.com/ipina</a></p>
  
  <pre><code>&lt;body&gt;
  Enter your name: &lt;input type="text" name="fname" id="fname" onchange="
    if(this.value=='foo'){
      this.select();
      this.focus();
    }
    "  /&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Also, I don't get any javascript errors or warnings in the Error Console on executing this code.</p>