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 );
});
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…