Greetings,
I am using the official Autocomplete jquery widget and am having troubles dynamically changing a variable (selectType) I\'m passing via the query string.
Try actually changing the source
option of the autocomplete on the change event.
$(function () {
var select = $( "#selectType" ),
options = select.find( "option" ),
address = $( "#address" );
var selectType = options.filter( ":selected" ).attr( "value" );
address.autocomplete({
source: "ajaxSearchForClientAddress.php?selectType=" + selectType,
minLength: 3
});
select.change(function () {
selectType = options.filter( ":selected" ).attr( "value" );
address.autocomplete( "option", "source", "ajaxSearchForClientAddress.php?selectType=" + selectType );
});
});