sDom not working to suppress page info text
sDom not working to suppress page info text
grahampcharles
Posts: 20Questions: 1Answers: 0
Using 1.9.2. I have a table started with:
[code]
oTable = $("#results-table").dataTable({
"bJQueryUI" : true,
"iDisplayLength" : 15,
"sDom:" : '<"H"r>t<"F">',
"bLengthChange": false,
...
[/code]
As I understand it, that should suppress the "Showing 1 to 3 of 3 entries (filtered from 50 total entries)" text, but it's nonetheless present. The search box is present, too.
Am I missing something about how sDom works?
Code is at http://pancake.io/10dbb7/wishlist.html if you're interested; click one of the categories to view the table.
g.
[code]
oTable = $("#results-table").dataTable({
"bJQueryUI" : true,
"iDisplayLength" : 15,
"sDom:" : '<"H"r>t<"F">',
"bLengthChange": false,
...
[/code]
As I understand it, that should suppress the "Showing 1 to 3 of 3 entries (filtered from 50 total entries)" text, but it's nonetheless present. The search box is present, too.
Am I missing something about how sDom works?
Code is at http://pancake.io/10dbb7/wishlist.html if you're interested; click one of the categories to view the table.
g.
This discussion has been closed.
Replies
However, when I click on one of the tabs, I just get an error: `wishlist.js:130TypeError: 'null' is not an object (evaluating 'currentWishlist.indexOf')` .
My guess is that you are initialising the DataTable with just a plain `$().dataTable()` call, before you then call it with your initialisation options set - the warning 'cannot reinitialise table' alert sort of indicates that this is the case.
Allan
The initialization code is exactly as I pasted it (or fully available at http://pancake.io/10dbb7/scripts/wishlist.js ).
Does it make a difference that the element is hidden when .dataTable() is called? Only I tried showing it first and the problem persists. Maybe my sDom is invalid? Though I've tried pasting your demo versions...
Can't find what I'm doing wrong...
1. Load the link
2. Click on the 'Everything' button
3. Alert saying "init table"
4. JS error
5. Click on "Kids Corner"
6. Alert saying "init table"
7. DataTables re-init warning
Get that donation link back up, 'cause I owe you a beer.
Sorry!
g.
You've got a spare colon in `sDom:` ... :-)
Allan
Gar, thanks.
g.