Help!!!Set Focus() on the input field......

Help!!!Set Focus() on the input field......

Hi All
   I wish to set focus on the same input field after the input is invalid....I used focus() method, but it only works in IE, not in FF or Chrome. Any helps would be appreciate...Thanks

My Html

  1. <div>
  2. <label>Product Quantity</label>
  3. <input name="productQty" id="productQty" type="text" />
  4. (1-999)
  5. </div>
My Jquery


  1. //check the product quantity
  2. $("#productQty").blur(function(){
  3. if(isNaN($("#productQty").val()) || $("#productQty").val().length > 3){
  4. $("#productQty").focus();
  5. $("#productQty").val('');
  6. return false; 
  7. }
  8. });
 The focus will go to next input field even the invalid value is entered. Please helps.....Thanks.