2 $('input.customer_autocomplete').each(function(i,real){
3 var dummy = $('#' + real.id + '_name');
4 $(dummy).autocomplete({
5 source: function(req, rsp) {
7 url: 'controller.pl?action=Customer/ajax_autocomplete',
11 current: function() { real.val },
14 success: function (data){ rsp(data) }
19 select: function(event, ui) {
20 $(real).val(ui.item.id);
21 $(dummy).val(ui.item.name);