javascript error if I enter 0 in input pagination in datatables-input pagination plugin used

javascript error if I enter 0 in input pagination in datatables-input pagination plugin used

PallaviPallavi Posts: 8Questions: 0Answers: 0
edited December 2013 in DataTables 1.9
1-error occurs if I enter 0 in input pagination in datatables Here I am getting aoData as undefined ,hence giving error during checking of aoData.nTR(line 14 here)..is any solution their to handle error if we enter 0 in pagination??

error at --if ( aoData.nTr === null ) ,here aoData is undefined if we enter 0 in pagination

This happens only when I search something and enter out of range +ve value in pagination box like 0 or 36 in condition their are only 3 pages(eg Page 1 of 3)

2-Also Entering 31 changes input(eg- Page 1 of 3,here 1 is input) to 3(if 31 is out of range) but if we enter -21 it does not change automatically to 0

plugin used for datatables is taken from http://datatables.net/plug-ins/pagination .Also jquery.dataTables.js version used is 1.9.4

[code]
if ( oSettings.aiDisplay.length !== 0 )
{
var iStart = oSettings._iDisplayStart;
var iEnd = oSettings._iDisplayEnd;

if ( oSettings.oFeatures.bServerSide )
{
iStart = 0;
iEnd = oSettings.aoData.length;
}

for ( var j=iStart ; j

Replies

This discussion has been closed.