/* * filename: findcustomer.js * * used in: customers/find.ctp * @todo: This doesn't update the ID for some reason. */ $(function() { $("#customerName").autocomplete({ source: "/customers/completeCustomer", minLength: 3, select: function(event, ui) { $("#CustomerId").val(ui.item.id); } }); } );