Double header, body and footer tag.
Double header, body and footer tag.
Hi,
I am using DataTable 1.9.0 with jQuery 1.7.1. I am trying to create a table with following code
a) HTML File:
[code]
......
......
......
[/code]
b) Initialize table and added footer with:
[code]
var oTable = $('#agentListTable').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bStateSave": true,
"fnStateSave": function (oSettings, oData) {
localStorage.setItem( 'DataTables_'+window.location.pathname, JSON.stringify(oData) );
},
"fnStateLoad": function (oSettings) {
return JSON.parse( localStorage.getItem('DataTables_'+window.location.pathname) );
},
"sScrollX": "100%",
"bScrollCollapse": true
});
//Add a select menu on type column
$("tfoot th").each( function ( i ) {
if(i == 2 ){
this.innerHTML = fnCreateSelect( oTable.fnGetColumnData(i) );
$('select', this).change( function () {
oTable.fnFilter( $(this).val(), i );
} );
}
} );
// Function to create select box in each column
function fnCreateSelect( aData ) {
var r='All', i, iLen=aData.length;
for ( i=0 ; i
I am using DataTable 1.9.0 with jQuery 1.7.1. I am trying to create a table with following code
a) HTML File:
[code]
......
......
......
[/code]
b) Initialize table and added footer with:
[code]
var oTable = $('#agentListTable').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"bStateSave": true,
"fnStateSave": function (oSettings, oData) {
localStorage.setItem( 'DataTables_'+window.location.pathname, JSON.stringify(oData) );
},
"fnStateLoad": function (oSettings) {
return JSON.parse( localStorage.getItem('DataTables_'+window.location.pathname) );
},
"sScrollX": "100%",
"bScrollCollapse": true
});
//Add a select menu on type column
$("tfoot th").each( function ( i ) {
if(i == 2 ){
this.innerHTML = fnCreateSelect( oTable.fnGetColumnData(i) );
$('select', this).change( function () {
oTable.fnFilter( $(this).val(), i );
} );
}
} );
// Function to create select box in each column
function fnCreateSelect( aData ) {
var r='All', i, iLen=aData.length;
for ( i=0 ; i
This discussion has been closed.