fnfilter - not updating table

fnfilter - not updating table

mariozmarioz Posts: 9Questions: 0Answers: 0
edited January 2011 in General
I am trying to get the default example worming on a table by adding a couple of input boxes on the colum. When you type a value in the input box the table says "processing" but it doesnt update or actually filter. Here is my js code

var asInitVals = new Array();
$(document).ready(function() {
// bind "click" event for links with title="submit"
var formName = '##frmList';
$("a[id=submit]").click( function() {
var linkact = jQuery(this).attr("title");

// validate required elements
if (!isCheckedById("SelectedContent")){
alert('Please select at least one item of content')
return false;
}
else {
$("##Act").val(linkact);
jQuery(formName).submit();
// return false to prevent normal browser submit and page navigation
return false;
}
});

var oTable = $('##DataList').dataTable( {
"aoColumns": [ null, null, null, null, null, null, null, null, null, null, { "bSortable": false } ],
"aLengthMenu": [[5, 10, 25, 50, -1], [5, 10, 25, 50, "All"]],
"bJQueryUI": true,
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "getData.cfm?catID=#Attributes.CategoryID#&cs=#Attributes.cs#",
"sPaginationType": "full_numbers",
"aaSorting": [[1,'asc']],
"iDisplayStart": 0,
"oLanguage": {"sSearch": "Search all columns:"}
} );

$("tfoot input").keyup( function () {
/* Filter on the column (the index) of this element */
oTable.fnFilter( this.value, $("tfoot input").index(this) );
} );

/* Support functions to provide a little bit of 'user friendlyness' to the textboxes in the footer */
$("tfoot input").each( function (i) {
asInitVals[i] = this.value;
} );

$("tfoot input").focus( function () {
if ( this.className == "search_init" ){
this.className = "";
this.value = "";
}
} );

$("tfoot input").blur( function (i) {
if ( this.value == "" ){
this.className = "search_init";
this.value = asInitVals[$("tfoot input").index(this)];
}
} );
//fnShowHide(7);
} );

function fnShowHide( iCol ){
/* Get the DataTables object again - this is not a recreation, just a get of the object */
var oTable = $('##DataList').dataTable();

var bVis = oTable.fnSettings().aoColumns[iCol].bVisible;
oTable.fnSetColumnVis( iCol, bVis ? false : true );
}

and here is my footer

















whould appreciate some direction. Many thanks
This discussion has been closed.