112
rated 0 times
[
117]
[
5]
/ answers: 1 / hits: 30698
/ 14 Years ago, tue, august 3, 2010, 12:00:00
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. The variable would change depending upon which option is selected via a select box.
$(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
});
});
More From » jquery