0

Has anyone ever sent a search request from one page to the dataTables jquery plugin on another page? I'm not sure if its even designed to work that way.

2 Answers 2

1

I think this is what you are looking for:

$('#dataTableBLOCK').dataTable( {
    "oSearch": {"sSearch": "YOUR-SEARCH-VALUE"},
    "bProcessing": true,
    "bServerSide": true,
    "sAjaxSource": "NAME-OF-DATATABLES-FILE.php"
} );

By changing YOUR-SEARCH-VALUE to a $_POST or $_GET value you make dataTables search what you were searching somewhere else.

Sign up to request clarification or add additional context in comments.

Comments

0

I am very sure that the search will only work when you are in the same page. The search box will filter the displayed rows of the table when the dataTables plugin is used.

1 Comment

That's what I was thinking, but I'm rather hoping that you can send the search parameter to the page that contains dataTables.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.