uncaught typeerror: cannot read property 'value' of null when open other datatable

uncaught typeerror: cannot read property 'value' of null when open other datatable

chelitovcchelitovc Posts: 2Questions: 0Answers: 0
edited April 2014 in Bug reports
hello
I have a datatables and filters to go well ... but another option to generate another datatable (this does not use the filter) I get the error "uncaught typeerror: cannot read property 'value' of null when open other datatable"

please help me
I have been several days this problem
[code]
$.fn.dataTableExt.afnFiltering.push(
function( oSettings, aData, iDataIndex ) {


var iMin = document.getElementById("min").value*1;//THE ERROR IN CHROME

var iMax = document.getElementById("max").value*1;


var iVersion = aData[3] == "-" ? 0 : aData[3]*1;
if ( iMin == "" && iMax == "" )
{
return true;
}
else if ( iMin == "" && iVersion <= iMax )
{
return true;
}
else if ( iMin <= iVersion && "" == iMax )
{
return true;
}
else if ( iMin <= iVersion && iVersion <= iMax )
{
return true;
}
return false;
}
);
[/code]

Replies

  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin
    Do you have an element on the page with an id of `min` ? That's what the error that you've been looking at for the last few days is telling you - you don't.

    In future, can you please follow the forum rules and link to a test case.

    Allan
  • chelitovcchelitovc Posts: 2Questions: 0Answers: 0
    edited April 2014
    thanks, of course I've an input whit id "min",this create whit the firts datatable...but the second data table without this input the charge "id".
    with a button "load" by the first table in a "div" (result), then with another button by the second datatable in the same "div" (result), there goes the error. apparently read the function "$. fn.dataTableExt.afnFiltering.push" of first datatable
    sorry Im new to this ..

    http://datatables.net/examples/plug-ins/range_filtering.html
This discussion has been closed.