Search Box Highlighting

Search Box Highlighting

SQLGuruSQLGuru Posts: 14Questions: 2Answers: 0
edited April 2013 in DataTables 1.8
Here is my scenario:

I have a webpage with anywhere between 1-8 datatables on the page simultaneously.
These tables use tabs across the top to seperate them visually.

I am trying to achieve 2 things here:

1 - When the user enters a search term in any of the search boxes, it should populate the search boxes on each tab and filter all datatables.
I have been directed to fnFilterAll before, but not entirely sure how to use that.

2 - If I am on Tab #2 and I click another tab, I would like to highlight the wording already in the searchbox. This would remove the neccessity for the user to click in the box and remove the wording, they can simply start typing.

Thanks,

SQLGuru

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    1. fnFilterAll is indeed currently the way to do that. How to use an API plug-in is described here: http://datatables.net/release-datatables/examples/plug-ins/plugin_api.html

    2. I guess the tab library you are using might have an 'activate' or 'show' callback? Use that to focus() on the input element.

    Allan
This discussion has been closed.