From jQuery UI site (veiw source):
$( \"#birds\" ).autocomplete({ source: \"search.php\", minLength: 2, select: function( event, ui ) { log(
Actually, you can do this more simple with type: "post":
$( "#birds" ).autocomplete({ source: "search.php", type: "post" minLength: 2, select: function( event, ui ) { log( ui.item ? "Selected: " + ui.item.value + " aka " + ui.item.id : "Nothing selected, input was " + this.value ); } });