Simple Filter Problem

Simple Filter Problem

techfactortechfactor Posts: 2Questions: 0Answers: 0
edited February 2011 in General
Trying to filter a column contiaining integers against a selected value from select dropdown, I don't think It;s compering numbers, it's filtering something just not greater than the selected value.
Select values are 0,1,7,90,180

[code]
$.fn.dataTableExt.afnFiltering.push(
function( oSettings, aData, iDataIndex ) {
var selected = $("#older_than option:selected").val();
var iAge = aData[16];
if (selected > iAge)
{
return true;
}
return false;
}
);
[/code]

Any advice much appreciated.

Replies

  • techfactortechfactor Posts: 2Questions: 0Answers: 0
    duh it wasn't comparing numbers, wrapped the variables in parseint solved the problem :-)
This discussion has been closed.