API Using own fields
API Using own fields
ericjlars
Posts: 1Questions: 0Answers: 0
I am trying to figure out the api so I can use my own field for the number of records pulldown
I have been able to do this with the filter by using:
HTML
JS
oTable = $('#myTable').dataTable();
$('#myInputTextField').keyup(function(){
oTable.fnFilter( $(this).val() );
})
I can't seem to figure out how to do this for the records per page pulldown. I have:
var oTable = $('#example').dataTable();
$('#myNumber').keypress(function(){
oTable.sLengthMenu( $(this).val() );
})
and then the html markup
10
20
30
But it is not working.
I have been able to do this with the filter by using:
HTML
JS
oTable = $('#myTable').dataTable();
$('#myInputTextField').keyup(function(){
oTable.fnFilter( $(this).val() );
})
I can't seem to figure out how to do this for the records per page pulldown. I have:
var oTable = $('#example').dataTable();
$('#myNumber').keypress(function(){
oTable.sLengthMenu( $(this).val() );
})
and then the html markup
10
20
30
But it is not working.
This discussion has been closed.
Replies
Allan