include extra parameters is not working
i am trying to include value of select box in the service URl method, But m getting response as
val_sec.php?lo=&query=[automcompleteoptions] var xc = $('#city_loc').val(); // Dropdown vaue here var ac = $("#name_loc").autocomplete({ serviceUrl:'includes_fm/validate_del_sec', //tell the script where to send requests delimiter: /(,|;)\s*/, // regex or character zIndex: 9999, params: {lo: xc}, deferRequestBy: 0, //miliseconds noCache: false, //default is false, set to true to disable caching onSelect: function(value, data){ alert('You selected: ' + value + ', ' + data); } });
Please help to resolve it
When you change value in a drop down then you would need to change params in autocomplete. Or try this:
params: {
lo: function () {
return $('#city_loc').val();
}
}
thumbs up!!! however i got it working like below also
onSearchStart: function(q) { q.entity_type = $('#city_loc').val(); }