Great. This is very good news. Thanks Dan. Rp
On Apr 5, 10:40 am, "Dan G. Switzer, II" <[EMAIL PROTECTED]> wrote: > Randy, > > >For those using Dan Switzer autocomplete module based on Dylan > >Verheul's plug-in, how do the db calls work once a connection is > >opened with the ajax option? For instance, if I set the minChars:2 and > >type in Jo, it queries all cities that start with Jo. But what happens > >as I contitue to type? Is Joh a new db call? And then Johns, another > >call, and so on? Or is the initial call stored in chache? > > It's amazing how quickly you forget stuff--especially when you just modded > someone elses code. :) > > First, the Autocomplete plug-in uses a keyboard delay before querying the > server. This should avoid AJAX calls for each letter that's pressed > (provided it's configured that way--which it's not by default.) > > By default, the library expects that if the user types in "Jo" that the AJAX > call will return all possible matches for the string "Jo". Provided the > results for the "Jo" call are still cached, there should be no additional > server traffic for any phrases starting with "Jo". > > This can be controlled with the "matchSubset" option. By default this is > turned on. If you set it to false (or 0,) then a new AJAX call would be made > for "Jo", "Joh" and "John". > > Also, you may want to be aware of the "matchCase". By default this is set to > false, so it's expecting the server to return case insensitive results. If > this option was set to true, then the string "Jo" is not the same as "jo". > > Hope this helps! > > -Dan