Привет,
Я использую официальный виджет автозаполнения jquery, и у меня возникают проблемы с динамическим изменением переменной (selectType), которую я передаю через строку запроса. Переменная будет меняться в зависимости от того, какая опция выбрана с помощью окна выбора.
$(function() {
var selectType = $('#selectType option:selected').attr("value");
$("#selectType").change(function(){
selectType = $('#selectType option:selected').attr("value");
alert (selectType); // alerts the right value for debugging
});
$("#address").autocomplete({
source: "ajaxSearchForClientAddress.php?selectType="+selectType,
minLength: 3
});
});