What exact version of the autocomplete plugin are you using? Have you tried autocomplete("option", "extraParams", ...) instead of setData?
Jörn On Sat, Aug 8, 2009 at 6:19 PM, pankaj<pankaj1...@gmail.com> wrote: > > Actually this part was working previously.I found one difference here, > maybe that help us to find out the actual root cause. Please let me > know if any of you are aware of this issue. > > Here is OLD and NEW difference of calling auto-completion. > ============================================================================= > OLD: > // Pass along field dependency values to filter auto-completion > list. > $textbox.focus(function() { > var fieldname = this.id; > $(this).flushCache(); > params = { fname:fieldname }; > $(this).setOptions({ extraParams:add_deps(autocomplete_drilldowns, > fieldname, params) }); > }); > ================================================================================ > NEW: > // Pass along field dependency values to filter auto-completion > list. > $textbox.focus(function() { > var fieldname = this.id.replace(/([{}])/g, '\\$1'); > $(this).autocomplete('flushCache'); > params = { fname:fieldname }; > $(this).autocomplete('setData', > { extraParams:add_deps > (autocomplete_drilldowns, > fieldname, params) }); > }); > =================================================================================== > > Is this causing any issue? > > Thanks > > > On Aug 8, 2:19 pm, pankaj <pankaj1...@gmail.com> wrote: >> Hi All, >> >> When I do focus is on the autocompletion textbox, that triggers the >> function right below where the autocompletion plugin is initialized , >> which is supposed to add the "&key=value" values to form the remote >> url. Based on this remote url I am getting the filtered output, which >> will list out in the autocompletion textbox but its not adding >> "&key=value". So I am getting all the list. I think the setData is >> not setting the extraParams. >> help? >> >> For example: >> If i select one field in the Html form say product "xyz" and based on >> this the release field should 3 values "1.1 | 1.2 | 1.3", but it >> displays all the list (almost 300 values). Its because when i select >> something in the autocompletion textbox then the url format should be >> something like this: >> >> http://mdx.lt.com/xyz/abc/ac-list?q=1.&limit=300×tamp=1249677100...{1}&product=mmm >> >> Instead of the above it is formating as. Here product field is >> missing, due to which it displays all the release value. >> >> http://mdx.lt.com/xyz/abc/ac-list?q=1.&limit=300×tamp=1249677100...{1}. >> >> This is my autocomplete call: >> >> $field.autocomplete({ >> url:ac_url, >> cacheLength:1, >> matchContains:true, >> max:300, >> width:'50%', >> scrollHeight:320, >> minChars:1, >> extraParams:{ fname:fieldname }, >> formatItem: function(data, i, max, value, term) { >> // data will be an array of value, description >> return '<span class="ui-autocomplete-value">' + value + >> '</span><span class="ui-autocomplete-info">' + data[1] + '</ >> span>'; >> } >> }); >> $field.autocomplete('result', function() { >> $field.change(); // Notify mass edit that the field's value has >> changed. >> $field.blur(); // Trigger auto-set. >> }); >> }); >> >> // Pass along field dependency values to filter auto-completion >> list. >> $textbox.focus(function() { >> var fieldname = this.id.replace(/([{}])/g, '\\$1'); >> $(this).autocomplete('flushCache'); >> params = { fname:fieldname }; >> $(this).autocomplete('setData', >> { extraParams:add_deps >> (autocomplete_drilldowns, >> fieldname, params) }); >> }); >> >> What is the right way to see what the above function (add_deps) is >> returning? >> >> Any help will be greatly appreciated. >> >> Thanks,