views:

53

answers:

1

Hi all,

I need some help in getting started with jQuery and autocompleting a username for example.


$('#username').replaceWith('<input id=\"username\" type=\"text\" name=\"user_name\">');

My first aim was to replace #username(dropdownbox) with a textfield. I already figured that out.

My second aim is:

Username: Faili

Username: Felix

By typing in 'f' in the textfield it should autocomplete to faili. If a second username starting with f exists, there schould be an option to select. Either faili or felix.

...like googlemails autocempleting.

Hm, any link or help you can offer?

Thank you in advance.

+1  A: 

If you need some widgets you can use autocomplete fonctionality of JQuery UI.
You can find the widget and the documentation here: http://jqueryui.com/demos/autocomplete/

MatTheCat