Autocomplete in WebApp?

Has anyone had any success with autocomplete on a web app?

Native Xojo has to call back to the server so the time lag makes autocomplete unreliably slow.

I suck a javascript, but I suspect it is my answer. Any ideas out there?

Very few web services offer autocomplete because of the huge overhead with communication. Dynamic autocomplete like Google offers is a ton of back and forth. You might be able to send a dictionary of acceptable phrases to the browser.

Could you be more specific about the use case?

It is indeed possible to create a dictionary in JavaScript to handle the suggestions, but at any rate, one still needs to send the data to the browser. So if there is a lot data, it will be slow anyway.

Fortunately, and the use case that I am thinking of, it will only be a couple of dozen items. So I think I can send the entire dictionary without too much overhead. But I don’t know how to implement it. Any suggestions?

Here’s a nice example: