Tweaked the customer similar JS. Now only fires if 3 chars entered
This commit is contained in:
parent
625eb8e42a
commit
150cbc7079
|
|
@ -10,16 +10,23 @@
|
|||
$(function() {
|
||||
|
||||
$("#dialog").hide();
|
||||
|
||||
/*If the user has entered 3 or more characters. Check to see if its similar to existing customers. */
|
||||
$("#customerName").change(function () {
|
||||
|
||||
$("#dialog").dialog('close'); //Remove any previously opened dialogs
|
||||
if($("#customerName").val().length >= 3) {
|
||||
|
||||
$.post("/customers/similarCustomers", $("#customerName").serialize(), function(data) {
|
||||
$("#similarCustList").html(data);
|
||||
});
|
||||
|
||||
|
||||
$("#dialog").dialog({position: 'right', width: 400});
|
||||
$("#dialog").dialog({
|
||||
position: 'right',
|
||||
width: 400
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}),
|
||||
|
|
|
|||
Loading…
Reference in a new issue