Empty results DOM
I'd like to attach some sort of markup that would inform the user when there are no results from the server (determined by an empty array server output). Currently, the only way I see to determine this is to check the data length from a custom processData function, since there's no other callback. Is this the preferred way? It would be nice to have a <div> already created and positioned where the $results DOM is, which displays when there's no results. This would enable something like what Facebook does:

Can do, put on the list
On Tue, Mar 20, 2012 at 01:50, Chris Basham [email protected] wrote:
I'd like to attach some sort of markup that would inform the user when there are no results from the server (determined by an empty array server output). Currently, the only way I see to determine this is to check the data length from a custom
processDatafunction, since there's no other callback. Is this the preferred way? It would be nice to have a<div>already created and positioned where the$resultsDOM is, which displays when there's no results. This would enable something like what Facebook does:
Reply to this email directly or view it on GitHub: https://github.com/dyve/jquery-autocomplete/issues/31
I'll do this but it takes a little more time than expected. Please have some patience :-)
Absolutely. My head was spinning a bit thinking about proper implementation. I would be astonished if this feature was a simple 20-min upgrade. Good luck.
Hi Dyve,
Thx for your work on this plugin. What about this feature ? I'd like to add some default values to be displayed with or without results ... Any advice ?
I worked around the lack of this feature in the following way:
- Check if there are any results in
processData - Add a "fake" result item if so
- Interpret the fake item in
showResult, rendering your custom DOM
In the process, I had to worked around issue #96, but in the end it works out pretty well.