So that I can optimize my autocomplete, I'd like your opinion. There are cases where there might be a couple hundred results - even if the full name of a person is typed in (like "Miller" or "Johnson"). Most of the time there are *that* many. But as I type, "Mi" ... "l" ... "e", the results are going to be a subset of the original. matchSubset default is true and cacheLength default is 10. Shouldn't it *not* sent a 2nd request to the server for the additional letters?
This are the current settings I'm using: $('#user').autocomplete("tools/people.lasso", {minChars: 2, delay: 150, formatResult: formatResult, formatItem: formatItem, max: 2000, width: 300}); On 12/6/07 11:41 AM, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote: > > Shelane Enos schrieb: >> Sorry it took a while. I had a very busy day. >> >> This example shows the focus bug: >> http://education.llnl.gov/jquery/adv_auto2.lasso >> >> This example shows the other bug: >> http://education.llnl.gov/jquery/adv_auto3.lasso >> This bug is the bug where the first set of results will override the second. >> I watch in firebug after I typed in mod a get was called for mo (my minimum >> number of letters) and then a get request was called for mod. The results >>> from mod came back quicker (because the results set was smaller or the query >> was faster). Then the first "mo" were returned and replaced the second. >> >> Just type mod and let it sit there. >> >> Thanks for looking. >> > Okay, thanks for the description. I think this is easy to fix: Just > include jquery.ajaxQueue.js on your site. It enhances jQuery's $.ajax > method and the autocomplete uses its abort-mode when available. That way > an active previous autocomplete request is canceled when a new one > starts. That should fix your problem. > > Thanks for bringing it up, I'll add something to the docs about it. > > http://dev.jquery.com/view/trunk/plugins/autocomplete/lib/jquery.ajaxQueue.js > > Jörn > >