Hi! I m use bassistance.de variant of this plugin and have next problem. I have dynamic number of pairs like "Town" - "Street" (users can add it manually). It's id: adr1 - str1, adr2 - str2, ... . HTML:
<input id="adr1" class="town sfield" type="text" /> <input id="adrid1" type="hidden" /> // Town ID, taked from backend <input id="str1" class="street sfield" type="text" /> <input id="strid1" type="hidden" /> // Street ID, taked from backend Street's autocomplete call looks like this: $("input.street").autocomplete("/streetsbase/", { delay:300, minChars:2, extraParams: { wt:2, townid: function() { // Town ID from #adridN (N=1, 2, ...) var num = $(this).attr('id').substring(3); // It's not work. "this" != current input field return $("#adrid" + num).val(); } } }); I want pass to "townid" correct ID of selected town (its number must correspond to the number of current street field). But autocomplete() method doesn't keep pointer to current input object. How I can solve this problem? sorry for my English