error when adding scrolling - no method 'outerWidth'
error when adding scrolling - no method 'outerWidth'
When add the the 3 scroll attributes to the dataTable I get the following error: "TypeError: Object # has no method 'outerWidth'". I'm using Chrome and DataTables 1.7.6 (same error with 1.8). Without the scrolling attributes the table and data display fine.
[code]
$('#dataDisplay').html('');
$('#dataDetailTable').dataTable({
"sScrollX": "100%",
"sScrollXInner": "110%",
"bScrollCollapse": true,
"aaData": jsonResult.jsonData.dataLines.detailData,
"aoColumns": jsonResult.jsonData.dataLines.columnData
});
[/code]
[code]
$('#dataDisplay').html('');
$('#dataDetailTable').dataTable({
"sScrollX": "100%",
"sScrollXInner": "110%",
"bScrollCollapse": true,
"aaData": jsonResult.jsonData.dataLines.detailData,
"aoColumns": jsonResult.jsonData.dataLines.columnData
});
[/code]
This discussion has been closed.
Replies
Allan
Allan
What does the javascript need "outerWidth" for? Looking through the Datatable javascript I see this in several places but don't have a good understanding of what it is doing.
I'm afraid that I would need to be able to reproduce the issue myself in order to be able to fix the issue, since i'm not sure what is causing it at the moment. If you are able to put together a small sample which shows the error, that would be very useful.
Allan
[code]
/* When x-scrolling both ways, fix the table at it's current size, without adjusting */
n.style.width = _fnStringToCss( $(n).outerWidth() );
[/code]
The item in question ("n") is an HTMLTableElement and does not have an "outerWidth" function.
Thoughts?
Really? Has anyone implemented scrolling in a non-Firefox browser?
Allan
[code]
Starting Row
REC_TYP
FIRM_ID
FUND_ID
FUND_DESCRIPTION
TA_TRANS_CODE
CANCEL_IND
FUND_PERCENTAGE
GROSS TRANSACTION AMOUNT
TA_TRANS_STATUS
TRADE DATE
POLICY_NUMBER
PRODUCT_CODE
REP NUMBER
REP NAME
ADDRESS_LINE
CITY
ZIP_CODE
STATE
PERCENT_SHARE
DCA_IND
10
2
1111
1234
abcd
abcd
S
0.0
101.01
O
1234567
1234567
02
1234567
John Doe
123 First Street
Somewhere
12345
ZZ
100
[/code]
I'm really not sure what else I can suggest without being able to reproduce the problem. Checking you don't have any trailing commas in your aoColumns and aaData arrays I guess, and that all the columns are the right length (21 from your table above).
Allan