Reputation: 177
I am using a data table script found at http://datatables.net/ref
This is the code I am using so far to just add the value to the search field. However it doesnt actually search the data table unless the user presses enter or adds/deletes a character in the search box. Refer to the link for a demo of exactly what it does, just type something in their search box.
<script type="text/javascript">
window.onload = (function() {
document.getElementById('search').value = " <?php echo $st;?>";
</script>
Thanks in advance for your help!
Upvotes: 0
Views: 525
Reputation: 30488
As far as I understand your question. You want when user enters any character or word , it should display all matching result in table format.
So for this you have to use onkeyup
event of this search box and call ajax
function for sending the input and displaying the result.
Hopes it clarifies your doubt. If any problem comes comment it.
Upvotes: 1