[eluser]mikeyhell[/eluser]
Copied from above ... I basically just added in that type:"post" but it won't pick up the post variable ... stays as get... not sure why it won't change but I checked on jquery forums and they said the same thing ... just add that param in and it should just work:
Code:
$.ajax({type: "post",
mode: "abort",
port: "autocomplete" + input.name,
dataType: options.dataType,
url: options.url,
data: $.extend({
q: lastWord(term),
limit: options.max
}, extraParams),
success: function(data) {
var parsed = options.parse && options.parse(data) || parse(data);
cache.add(term, parsed);
success(term, parsed);
}
});
From my view:
Code:
$(document).ready(function(){
$("#client_name").autocomplete("<?php echo base_url() ?>ajax/customers", {
scroll: true,
scrollHeight: 300,
autoFill: true,
cacheLength: 1,
min: 1,
max: 20,
matchContains: false,
onItemSelect:selectItem, selectOnly:1, elementID:'cust_id'
});
});