Monday 15 August 2011

JQuery UI Autocomplete on first and last name fields -


I think someone else will have this problem, but I can not find an answer anywhere. I would like 2 input fields, first and last name with the same autocomplete source when a user types in the first and last name fields, then I can filter by filtering the first name with the last name of the first name field and last name field Want an autocomplete dropdown for

My code is currently implemented, just implement autocomplete on both areas.

  $ (function () {var name = ["John Smith", "Jimmy Dow", "Stuart Brown"]; $ ("#firstname"). Autocomplete ({source: names }); $ ("#lastname"). Autocomplete ({source: names});}); & Lt; Input type = 'text' id = 'firstname' / & gt; & Lt; Input type = 'text' id = 'lastname' / & gt;   

By typing Jammu in the first field, John Smith and Jimithio do will be performing, but in the other area, typing the S will not only show John Smith, Stuart Brown.

How it works currently:

I work in source options Had to select the occurrence of the auto-completion and widget. (

Sorry if the code is slightly thicker; I had to convert it to coffeeplepship.

No comments:

Post a Comment