Jump to content

pr0c3ss

New Members
  • Posts

    8
  • Joined

  • Last visited

pr0c3ss's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Was testing the outcome difference. No worry's about this now...works have annoyingly said another dpt has integrated a solution for what they want... thanks for advice oh requinix
  2. if ( ( min <= page && page >= max ) ) { return true; } full function... $.fn.dataTable.ext.search.push( function( settings, data, dataIndex ) { var inR = document.getElementById("in-range"); var outR = document.getElementById("out-range"); var min = parseInt( $('#min').val(), 10 ); var max = parseInt( $('#max').val(), 10 ); var page = parseFloat( data[11] ) || 0; if ($("#in-range").is(':checked')){ console.log('inrange active'); if ( ( isNaN( min ) && isNaN( max ) ) || ( isNaN( min ) && page <= max ) || ( min <= page && isNaN( max ) ) || ( min <= page && page <= max ) ) { return true; } } else{ console.log('outrange active'); if ( ( min <= page && page >= max ) ) { return true; } } //return false; } ); var table = $('#output').DataTable(); $('#min, #max').keyup( function() { table.draw(); }); });
  3. above values seem to return but below dont
  4. var page = a column in a html table perhaps if I link you this example https://datatables.net/examples/plug-ins/range_filtering.html This searches within a range - like above. I need the search to search outside of the range. So if min and max entered values are 3-7...and page column holds 1-10.... 1,2,3,7,8,9 should return
  5. The code example returns values that fall within the if statement (within entered min and max values)...which works fine... I have been trying to amend this, so it return values that fall outside of a given min and max range. So if table holds data 1-9 and some enters min 3 and max 7 as a range - the return should be 1,2,3,7,8,9
  6. If the logic of finding values between a min max range = var min = parseInt( $('#min').val(), 10 ); var max = parseInt( $('#max').val(), 10 ); var page = parseFloat( data[11] ) || 0; if ($("#in-range").is(':checked')){ if ( ( isNaN( min ) && isNaN( max ) ) || ( isNaN( min ) && page <= max ) || ( min <= page && isNaN( max ) ) || ( min <= page && page <= max ) ) { return true; } ... what's the logic of displaying values that fall outside of given min/max ranges? for ex. Table holds data 1-9. Min range = 3 max range = 7 the return should be 1,2,3,7,8,9
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.