Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do i use JQuery Autocomplete for multiple words

I have an autocomplete field and am just wondering how can i use it for multiple words? When i type the first word it works perfect, but when i space and type in the second word, its sends the two words back to the server and of course the results are wrong!

eg. when i type the two words,

'Java javascript'

the first word 'Java', autocomplete works well, pull the list.

but when i space and type javascript, autocomplete sends 'Java +javascript' to my ajax function.

Any ideas how to fix this?

like image 203
Karthik Avatar asked May 05 '09 09:05

Karthik


1 Answers

If you are using the "bassistance" version of Autocomplete, it's built in. But if you are using the jQuery UI version, there is an example here:

http://jqueryui.com/demos/autocomplete/#multiple

like image 95
Sam Avatar answered Sep 20 '22 11:09

Sam