Autosuggest Some More!
The second part of my three-part series on how to create an autosuggest textbox (to emulate Google Suggest) is now up on WebReference. I got a lot of positive feedback on the first part, and I hope everyone enjoys this one just as much.
Disclaimer: Any viewpoints and opinions expressed in this article are those of Nicholas C. Zakas and do not, in any way, reflect those of my employer, my colleagues, Wrox Publishing, O'Reilly Publishing, or anyone else. I speak only for myself, not for them.
Both comments and pings are currently closed.




5 Comments
Great, but typeahead does not work correctly if type too fast.
wangvisual on April 18th, 2005 at 4:09 am
Well, I never promised it would work under all conditions. The article is meant to be a guide for the 90% use case. Naturally I can't anticipate everyone's use cases. But then again, if I did, what would be left for you guys to figure out?
Nicholas C. Zakas on April 18th, 2005 at 9:13 pm
Do you know when they plan on publishing the third part? 'Google sugges't gets around the "typeahead does not work correctly if type too fast" problem by using timers in their code that wait a short period of time before calling the autosuggest code.
Glyn on April 19th, 2005 at 8:41 am
Glyn, I'm still in the middle of writing the third part, so probably not until next week.
I'm aware of how Google Suggest used timers, but I'm always weary of using other's techniques in my articles. The usage agreement for Google Labs specifically states that you're not supposed to publicly post anything for any of the code they have, and I take that agreement very seriously. I figure that people will use what I wrote in the article as a starting point to build more complex functionality.
Nicholas C. Zakas on April 19th, 2005 at 10:48 am
You don't actually need a timer to fix the typeahead problem; all you need is a mutex that prevents handleKeyUp from executing requestSuggestions(this, true) twice in sequence.
Biren Roy on April 29th, 2005 at 8:17 pm
Comments are automatically closed after 14 days.