I need a to use an autocomplete in rails application. Which use the combobox as source. I used jquery autocomplete and combobox.
But i need an extra feature. Suppose we type “Apple” and it is not available in auto-complete search it shows a new item in the list named “Create New Apple”, if we select it triggers a JavaScript event. so that we can open some dialog to add it.
Moreover the autocomplete can also be updated after rendering. Means if we add new record, it can also be populated in the list.
Hope to get good stuff from you guys.
I full filled my scenario with this code. I modified the code from the jquery site, refactor the change event to.
and in the source function
This fulfilled my requirement. Hope will be help full for some one else.