4 [% L.javascript_tag('jquery-ui') %]
5 <link rel="stylesheet" href="css/ui-lightness/jquery-ui-1.8.12.custom.css" type="text/css" />
8 id: [% L.input_tag('customer_id', '') %]
9 nr: [% L.input_tag('customer_customernumber', '') %]
10 desc: [% L.input_tag('customer_name', '') %]
12 <script type='text/javascript'>
13 function autocomplete_customer (selector, column) {
14 $(function(){ $(selector).autocomplete({
15 source: function(req, rsp) {
17 url: 'controller.pl?action=Customer/ajax_autocomplete',
22 current: function() { $('#customer_id').val() },
25 success: function (data){ rsp(data) }
30 select: function(event, ui) {
31 $('#customer_id').val(ui.item.id);
32 $('#customer_customernumber').val(ui.item.customernumber);
33 $('#customer_name').val(ui.item.name);
37 //autocomplete_customer('#customer_customernumber', 'customernumber');
38 autocomplete_customer('#customer_name', '');