views:

37

answers:

2

I have a g:textfield, and I want to write something and then show me all the options possible that start with the same letter. I understand that is called AutoComplete.

Maybe using jQuery or JavaScript?? Any ideas??

Thanks in advance!

A: 

say you are going to autocomplete on a 'thing' field

  1. you need an autocomplete widget, jquery has one, that you use for the thing field
  2. you need a server endpoint that finds 'things' based on what the user types in. this endpoint will return json.

thats really it. as you mentioned, the widget will use ajax to query the server when the user types in the field, and it will use the response to draw a div that contains possible completions.

hvgotcodes
any code??? to get an idea??
fgualda87
@fgualda87 which part do you need help with?
hvgotcodes
+3  A: 

How about using an existing plugin:

If have problem to use it with <g:textfield>, Here is a thread that may help you to implement.

NAVEED