FixedHeader not working at all
FixedHeader not working at all
susang
Posts: 5Questions: 0Answers: 0
FixedHeader appears to be doing absolutely nothing on my page. The examples from this site work so I assume it's not a browser issue but rather I must be missing something in my implementation.
I downloaded the FixedHeader plugin and verified that it is being included on the page with an alert('foo'); sanity check.
Everything else works (sorting, pagination, filtering, fnDrawCallback); the header just doesn't float when I scroll. I'm testing in IE9 for now but it'll need to work across all platforms. What am I missing?
This is my intitialisation code:
[code]
$(document).ready(function() {
var oTable = $('#xget').dataTable({
"fnDrawCallback": function() {
var myString = document.getElementById('xget').outerHTML;
var start = myString.search(/\/) + 8;
var end = myString.search(/\<\/TFOOT\>/);
var footer = myString.substring(start,end);
document.exportToExcelForm.excelOutput.value = document.getElementById('xget').outerHTML.replace("\r\n","").replace(footer,"");
document.exportToExcelForm.excelOutputFooter.value = footer;
document.exportToExcelForm.Filter.value = this.dataTableSettings[0].oPreviousSearch.sSearch;
document.exportToPDFForm.PDFOutput.value = document.getElementById('xget').outerHTML.replace("\r\n","");
document.exportToPDFForm.Filter.value = this.dataTableSettings[0].oPreviousSearch.sSearch;
},
"oLanguage": { "sSearch": "Type anything to filter this data:" },
"iDisplayLength": 25,
"bJQueryUI": true,
"bDestroy": true,
"sPaginationType": "full_numbers"
});
new FixedHeader( oTable );
});
[/code]
And this is my table (being built by CF8):
[code]
Division
Unit ID
Driver
Year Make Model
VIN
Plate Number
State
Odometer
#lease_info.CustDiv#
#lease_info.Unit#
#lease_info.DRFirstName# #lease_info.DRLastName#
#lease_info.Yr# #lease_info.Make# #lease_info.Model#
#lease_info.Serial_No#
#lease_info.Plate_No#
#lease_info.Plate_St#
#lease_info.Mileage#
[/code]
I downloaded the FixedHeader plugin and verified that it is being included on the page with an alert('foo'); sanity check.
Everything else works (sorting, pagination, filtering, fnDrawCallback); the header just doesn't float when I scroll. I'm testing in IE9 for now but it'll need to work across all platforms. What am I missing?
This is my intitialisation code:
[code]
$(document).ready(function() {
var oTable = $('#xget').dataTable({
"fnDrawCallback": function() {
var myString = document.getElementById('xget').outerHTML;
var start = myString.search(/\/) + 8;
var end = myString.search(/\<\/TFOOT\>/);
var footer = myString.substring(start,end);
document.exportToExcelForm.excelOutput.value = document.getElementById('xget').outerHTML.replace("\r\n","").replace(footer,"");
document.exportToExcelForm.excelOutputFooter.value = footer;
document.exportToExcelForm.Filter.value = this.dataTableSettings[0].oPreviousSearch.sSearch;
document.exportToPDFForm.PDFOutput.value = document.getElementById('xget').outerHTML.replace("\r\n","");
document.exportToPDFForm.Filter.value = this.dataTableSettings[0].oPreviousSearch.sSearch;
},
"oLanguage": { "sSearch": "Type anything to filter this data:" },
"iDisplayLength": 25,
"bJQueryUI": true,
"bDestroy": true,
"sPaginationType": "full_numbers"
});
new FixedHeader( oTable );
});
[/code]
And this is my table (being built by CF8):
[code]
Division
Unit ID
Driver
Year Make Model
VIN
Plate Number
State
Odometer
#lease_info.CustDiv#
#lease_info.Unit#
#lease_info.DRFirstName# #lease_info.DRLastName#
#lease_info.Yr# #lease_info.Make# #lease_info.Model#
#lease_info.Serial_No#
#lease_info.Plate_No#
#lease_info.Plate_St#
#lease_info.Mileage#
[/code]
This discussion has been closed.