views:

33

answers:

2

Hey guys,

When I type something in the address, the google suggestion service is offering an autocomplete.

I would like to write my own autocomplete... I tend to use yubnub and I need my own commands with autocomplete.

How can I do that?

Please advise,

Thanks,

-hbt

+1  A: 

I use a variation of this code:

http://www.codeproject.com/KB/aspnet/Search_SuggestTextBox.aspx

Essentially, every time a key is pressed in the box, an ajax call is made and the textbox's value is passed to a PHP page that parses the typed text, makes sense of it, and displays a drop-down-like box that gives you selection options.

You can see my implementation on this page:

http://www.needthishere.com/index.php

Once the page loads, type a zip code in the appropriate box. This technique can be used for an type of auto-complete-lookup-type functionality.

Dutchie432
+1  A: 

Currently there isn't a way to hook into Chrome's address bar (called the Omnibar by the Chrome team) but there is a proposed extension API:

This API would let you get events when then user types into the Omnibar, and return suggestions that would be displayed in the autocomplete section.

Currently, this is enabled as an experimental API, so you can probably start playing with it:

You'll need to follow these directions on how to enable experimental APIs for extension development:

I haven't used this API myself, but it would be good to get any feedback you might have if you do wind up writing something. The best place for that would be to send a message to the Chromium extensions discussion group: http://groups.google.com/a/chromium.org/group/chromium-extensions/topics

Arne Roomann-Kurrik
Thanks. That's what I was looking for.
hbt