1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
$(document).ready(function() { var a; a = $("#id_name").autocomplete({ serviceUrl: baseurl + '/acl', minChars: 2, width: 250, id: 'id-name-ac', onSelect: function(value,data) { $("#id_xchan").val(data); } }); a.setOptions({ autoSubmit: true, params: { type: 'a' }}); });