focus in textbox not going after alert in FF?
<p>I am doing length validation with java script. If input is short in length I shows an alert and after that I want to set focus back in the text field. It is working in IE but not working in FF. I have searched a lot on google but no solution could work plz guide and help me.</p>

<pre><code>function IsLengthOK(_title,_control,_length)
        {
               if(_control.value.length &lt; _length)
                {   
                   alert("'"+ _title +"'" + " must be minimum "+_length+"  characters in length");                                                                                            
                   document.getElementById('txtUserName').focus();

                   return(false);  
                }
        }
</code></pre>

<p>I am calling this function here on textbox's blur event:</p>

<pre><code>if(IsLengthOK("Registration Username",this,6))
        {
       // do something next.            
        }
</code></pre>

<p>HTML of my textbox is:</p>

<pre><code>&lt;input id="txtUserName" type="text" tabindex="1" name="txtUserName" style="background: none repeat scroll 0% 0% white;"&gt;
</code></pre>
