title: Javascript focus not working in firefox
body: <p>This code works fine in &lt;= IE7, but it doesn't work in firefox .. i am using firefox browser 12.0 .. I am not sure whats the reason .. help would be much appreciated .. thanks ..</p>
  
  <pre><code>&lt;head&gt;
   &lt;script type="text/javascript"&gt;
     function getfocus(obj){
        if(obj.value.length==0){
          alert("Please enter something");
          obj.focus();
        }
     }
   &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
     &lt;input type="text" onblur="getfocus(this)" value="Get focus"&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>