Hi , you have to make a little changes in autocomplete.js Search for "*if (data && data.length*)" condition which is inside "request" function. Add this code before the *if * condition
if(data) data.length=0; Thanks Rupak On Mon, Aug 31, 2009 at 3:36 PM, mathieuuu <mathie...@gmail.com> wrote: > > Hello, > > I am currently using the jquery autocomplete ($Id: > jquery.autocomplete.js 5785 2008-07-12 10:37:33Z) with remote data. > > Obviously I did not disabled the cache and "matchSubset" option (all > matches of "foot" are a subset of all matches for "foo"), which > reduces the number of queries made to the server. > > This is working well except in one case : if "foo" returns an empty > result set, continue by typing "foot" will still generate another > query to the server ... > From my point of view this shouldn't be useful (if "foo" doesn't > return results, "foot" won't either) and I am looking for a way to > have the same "cache usage" with empty result as with not-empty > results. > > Does anyone have an idea of how this could be done or knows the reason > why there is this difference of behaviour ? > > Thank you a lot for your help. >