cmc-sales/webroot/js/findcustomer.js

38 lines
627 B
JavaScript
Raw Normal View History

2010-03-17 15:54:12 -07:00
/*
* filename: findcustomer.js
*
* used in: customers/find.ctp
*
2010-03-17 15:54:12 -07:00
*/
$(function() {
$("#dialog").hide();
2010-03-17 15:54:12 -07:00
/*If the user has entered 3 or more characters. Check to see if its similar to existing customers. */
$("#customerName").change(function () {
2010-03-17 15:54:12 -07:00
if($("#customerName").val().length >= 3) {
2010-03-17 15:54:12 -07:00
$.post("/customers/similarCustomers", $("#customerName").serialize(), function(data) {
$("#similarCustList").html(data);
});
$("#dialog").dialog({
position: 'center',
width: 400
});
}
})
2010-03-17 15:54:12 -07:00
}
);