views:

28

answers:

2

I'm using http://docs.jquery.com/Plugins/Autocomplete

I'd like to add two results to the end to always appear. How would I do this?

A: 

you have to modify the existing auto-complete source code to do this. you can modify the method fillList() to always include the results taht you need.

Elangovan
A: 

If you are pulling your data as JSON you can add data to it using push as described in this SO question. You'd have to make sure you controlled the size of the return set if you wanted the appended items to always be available.

Otherwise, as Elangovan said, you could consider modifying the code, though I would do that as a last resort to ensure you don't have to modify it every time a new version of JQuery UI comes out.

Josh