How to use search textbox with Enter event

How to use search textbox with Enter event

kukmankukman Posts: 2Questions: 1Answers: 0

I use DataTable for my project and everything look fine. However, I want to use search textbox with Enter event to reduce the work load in database side.

I try with the simple code below with 'DataTables-1.10.11' and 'jquery-1.12.3'
but the message shown "Object doesn't support property or method 'fnFilterOnReturn'", please suggest me how to fix it.

<link rel="stylesheet" type="text/css" href="../jQuery/dataTable/css/jquery.dataTables.css"/>
<script type="text/javascript" src="../jQuery/jquery-1.12.3.min.js"></script>
<script type="text/javascript" src="../jQuery/dataTable/js/jquery.dataTables.js"></script>
<script type="text/javascript" src="../jQuery/dataTable/js/fnFilterOnReturn.js"></script>

<script type="text/javascript">

$(function() {
$(document).ready(function() {
var table = $('#TmpTable').DataTable( {
}).fnFilterOnReturn();
} );
});
</script>

Answers

  • kukmankukman Posts: 2Questions: 1Answers: 0

    Hi All, I can solve this issue by degrade version of DataTable from '1.10.11' to '1.9.4'.

    It's a bit surprise me that this feature didn't support in newest version (1.10.12). I fell that it should have more features that it didn't work properly.

This discussion has been closed.