cmc-sales/webroot/js/autocomplete-customer.js
2010-03-11 10:32:00 +11:00

37 lines
868 B
JavaScript

/*
* autocomplete-customer.js
*
*
*
*/
$(function() {
$("#customerName").autocomplete({
source: "/customers/completeCustomer",
minLength: 1
});
$("#CustomerCountryName").autocomplete({
source: "/countries/completeCountry",
minLength: 2,
select: function(event, ui) {
//alert("You selected " + ui.item.value + " ID:"+ ui.item.id);
$("#CustomerCountryId").val(ui.item.id);
if(ui.item.value == 'Australia') {
$("#ABN").show();
}
else {
$("#ABN").hide();
}
}
});
});