Custom filling Search INPUT field

Custom filling Search INPUT field

cromancroman Posts: 2Questions: 0Answers: 0
edited April 2011 in General
Hello, thanks for these great Datatables...

I have already Donated Transaktionscode: 5KY823199Y807****

One question i have... how can i fill the searchfield by external interaction like when i click on a button or text link or map link? On my Website I have over the Datatabes a HTML-MAP of Germany with 16 Regions from Germany (Hessen, Bayern, ...) so i would like to have a extra function to fill out the Datatables Searchfield with this clicked Region name, than i get the results in my table only from clicked this region.

I hope anyone anderstand my problem...

Thanks for any request or link to solve my problem...

Replies

  • allanallan Posts: 63,520Questions: 1Answers: 10,473 Site admin
    Thanks for the donation :-). If you could use the support option in future ( http://datatables.net/support ) that would be useful as it allows me to track support requests.

    You can use the fnFilter ( http://datatables.net/api#fnFilter ) to perform a filter on the table. The value will be automatically inserted into the input field (assuming you are using DataTables 1.7+).

    Allan
  • cromancroman Posts: 2Questions: 0Answers: 0
    edited April 2011
    Hello Allan, I wont AUTOMATICALLY insert strings into the input field, only when i click on one of my 16 text links.


    My Datatable looks like this:

    [code]
    var oTable;


    /* Formating function for row details */
    function fnFormatDetails ( nTr )
    {
    var aData = oTable.fnGetData( nTr );
    //<![CDATA[
    var sOut = '';
    sOut += 'Name:<\/td>'+aData[1]+'<\/td><\/tr>';
    sOut += 'Zusatz/Info:<\/td>'+aData[2]+'<\/td><\/tr>';
    sOut += 'Stra
This discussion has been closed.