27 lines
356 B
JavaScript
27 lines
356 B
JavaScript
|
|
/*
|
||
|
|
* 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: 2,
|
||
|
|
select: function(event, ui) {
|
||
|
|
$("#CustomerId").val(ui.item.id);
|
||
|
|
}
|
||
|
|
|
||
|
|
});
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
);
|