Ignoring HTML when filtering not working
Ignoring HTML when filtering not working
I have a table that I want to filter. One column has some HTML, this is specified in the aoColumns parameter with sType: 'html', but it's still using the HTML when filtering.
Here is the example page: http://pokemondb.net/item/all
If you type "sprite" in the box, nothing get filtered because the images all have a class of "sprite". Other phrases filter properly. Here is the JS code for the table:
[code]
// this is set in the included file
var dtParams={aoColumns:[],bPaginate:!1,bAutoWidth:!1,bInfo:!1,bProcessing:!0,asStripClasses:[],sDom:"rt"};
// from line 4051
$(window).load( function() {
dtParams.aoColumns = [
{ sType: 'html' }, // name
null, // cat
{ bSortable: false }, // effect
];
oTable = $('.data').dataTable( dtParams );
oHeader = new FixedHeader( oTable );
var $fltName = $('#itfilter_name');
$fltName.keyup( function() {
oTable.fnFilter( this.value );
} );
if ( $fltName.val() != '' )
oTable.fnFilter( $fltName.val() );
} );
[/code]
Here is the example page: http://pokemondb.net/item/all
If you type "sprite" in the box, nothing get filtered because the images all have a class of "sprite". Other phrases filter properly. Here is the JS code for the table:
[code]
// this is set in the included file
var dtParams={aoColumns:[],bPaginate:!1,bAutoWidth:!1,bInfo:!1,bProcessing:!0,asStripClasses:[],sDom:"rt"};
// from line 4051
$(window).load( function() {
dtParams.aoColumns = [
{ sType: 'html' }, // name
null, // cat
{ bSortable: false }, // effect
];
oTable = $('.data').dataTable( dtParams );
oHeader = new FixedHeader( oTable );
var $fltName = $('#itfilter_name');
$fltName.keyup( function() {
oTable.fnFilter( this.value );
} );
if ( $fltName.val() != '' )
oTable.fnFilter( $fltName.val() );
} );
[/code]
This discussion has been closed.
Replies
Allan