javascript - Jquery: Possible to dynamically change source of Autocomplete widget? -


Greetings,

I am using the official AutoClplet jquery widget and dynamically assigns a variable Switching Selecttype) I'm passing through the query string. There is a variable change depending on the option selected by the ARTR ("Value" box selected.

  $ (function () {var selectType = $ ('# selectType option: selected') ; Attr ("value" ARTR ("value"); Alert (type select); // alerts the correct value for debugging); ($ ("# selectType"); $ ("# selectType") Change (function () {selectType = $ ('# selectType option: selected').); $ ("# Address"). Autocomplete ({Source: "Ajax Search Foreclint. Officer.PP? Selection Type =" + please type , Minaltata: 3});});  

Automatically source Try to auto-complete the change event.

  $ (choose function () {var = $ ("#selectType"), option = choose.Find ("Options "), Address = $ (" #address "); var selectType = options.filter (": selected ") .attr (" value "); address.autocomplete ({source:" ajax searchforclient.addp.php? Selecttype = "+ Selecttype, minlength: 3}); select.change (function () {selectType = options.filter (": selected ") .attr (" value "); Address.autocomplete ("option", "source", "ajaxsearchforclientaddress.php? Selecttype =" + selecttype;)}); });  

Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -