[Solved] Filter from own input

[Solved] Filter from own input

devcsoftdevcsoft Posts: 5Questions: 0Answers: 0
edited September 2012 in General
Hi,

Great plugin, but, I need filter from my owns inputs, how can I do it?

Thanks.

Replies

  • devcsoftdevcsoft Posts: 5Questions: 0Answers: 0
    It has to do with the _fnFeatureHtmlFilter(oSettings) function, and the element div.dataTables_filter; but I dont know what oSettings are; nor how change this function for filter from my own inputs.

    Thanks.
  • devcsoftdevcsoft Posts: 5Questions: 0Answers: 0
    No one knows how to filter from an input that isn't in the table?
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Can you not just call the fnFilter API method with your input data?

    Allan
  • devcsoftdevcsoft Posts: 5Questions: 0Answers: 0
    Yes, it works. I searched for something like this.

    Thanks Allan.
  • devcsoftdevcsoft Posts: 5Questions: 0Answers: 0
    edited September 2012
    Solution:

    $(document).ready(function () {
    var content = $('#input').val();
    $('#input').keyup(function() {
    if ($('#input').val() != content) {
    content = $('#input').val();
    oTable.fnFilter(content);
    }
    });
    });
This discussion has been closed.