Global Search Box - Auto Suggest Enhancement....

Global Search Box - Auto Suggest Enhancement....

bharbhar Posts: 18Questions: 6Answers: 0

I am using Datatables 1.10, and Global Search Box on website: connectco.net

I am noticing visitors do come but leave because they have no clue what to type and search. This is a waste and a loss.

The faded text inside the box he is a prompt but not enough. Simply because, visitors have no means of knowing the depth of content in the database. To make it easier for the searcher, I am planning to introduce an AutoSuggest feature in the Global Search box. (Similar to Google Search box but simple one with only some 100 phrases).

What I am looking for is -- when a Searcher keys in the search box say,

Military, a list of all phrases with M should appear in the Global Search Box helping the visitor to type in or choose the correct phrase and also get to know the options he has.

Live example here: connectco.net > Global Search on top. (I have increased the size of the Global Search Box)

Also, I would prefer the user hits enter key when filtering happens and not any key press.

I am being extra careful as i do not want to disturb a working website by meddling with the code.

Any code sample or a guideline on how to manipulate the search box will be useful

Answers

  • allanallan Posts: 63,686Questions: 1Answers: 10,500 Site admin

    Thanks for you suggestion. As we discussed by e-mail, I think you would be best of looking into using an auto complete library such as jQuery UI's auto complete, or perhaps something like Select2 or Selectize and populating it with values from the cells().render() method.

    Regards,
    Allan

  • bharbhar Posts: 18Questions: 6Answers: 0

    The jQuery auto complete is fabulous...

    Unable to figure out how to integrate with datatables 1.10 /

    Need some code sample...

This discussion has been closed.