in my autocomplete select handler "focus()" doesn't work

in my autocomplete select handler "focus()" doesn't work

Ok I have some autocompletes for some input fields, and I wanted to pass the focus to the next field over when the user makes a selection from the preceding inputs autocomplete list. So in my select handler, after setting all the field values I added a "focus()" but it doesn't work. Here's the code I'm using:

  1. // As soon as a certain div is opened, focus goes to my first field to which I also apply autocomplete
  2. $("input#db_street").focus().autocomplete({
  3.     source: "mysource.php",
  4.     minLength: 3,
  5.       select: function(event, ui) {
  6.             $('#db_street').val(ui.item.dug+" "+ui.item.duf);
  7.             $('#db_dug').val(ui.item.dug);
  8.             $('#db_duf').val(ui.item.duf);
  9.             $('#db_CAP2').val(ui.item.CAP);
  10.             // All the fields are getting correctly these values,
  11.             // now I want focus to go automatically to the next field
  12.             $('#db_civ').focus();
  13.             // But for some reason it ain't happening
  14.             return false;
  15.             }
  16.       });


John R. D'Orazio