Search function and onclick event

Search function and onclick event

PeepingtomPeepingtom Posts: 1Questions: 0Answers: 0
edited January 2011 in General
Hi,

I'm using this great script that is DataTables.
I'm using it with large table, a lot of datas, so I would like to be able to trigger the search function only by the click on a button , and not on key change, that make a lot of ajax call to my server.

Any idea where to start ?

thanks again for this script.

Replies

  • msonimsoni Posts: 2Questions: 0Answers: 0
    Admin,

    Please do some suggestion for this problem. I want search filter with ONCLICK Event.
  • msonimsoni Posts: 2Questions: 0Answers: 0
    edited February 2012
    Use This Code. You will be able to filter through click button event

    [code]
    /*HTML Code*/
    Search

    $(document).ready(function() {
    var oTable = $('#example').dataTable();

    $('#setV').click( function () {
    oTable.fnFilter( $('#txt').val());
    } );
    [/code]

    :)
This discussion has been closed.