W3C markup validation issue
W3C markup validation issue
Hi. I have this in my html:
the W3C validator complains with a message: end tag for "TABLE" which is not finished, is there a way to get rid of this error with datatables so it'll pass W3C validation ?
the columns are declared in the table script itself like this:
"aoColumns": [
{"sTitle": "ColA", "bSortable": true, "sWidth": "550px"},
{"sTitle": "ColB", "bSortable": false, "sWidth": "120px"},
{"sTitle": "ColC", "bSortable": true, "sWidth": "70px"},
{"sTitle": "ColD", "bSortable": true, "sWidth": "70px"}
],
the W3C validator complains with a message: end tag for "TABLE" which is not finished, is there a way to get rid of this error with datatables so it'll pass W3C validation ?
the columns are declared in the table script itself like this:
"aoColumns": [
{"sTitle": "ColA", "bSortable": true, "sWidth": "550px"},
{"sTitle": "ColB", "bSortable": false, "sWidth": "120px"},
{"sTitle": "ColC", "bSortable": true, "sWidth": "70px"},
{"sTitle": "ColD", "bSortable": true, "sWidth": "70px"}
],
This discussion has been closed.
Replies
[code]
<!ELEMENT TABLE - -
(CAPTION?, (COL*|COLGROUP*), THEAD?, TFOOT?, TBODY+)>
[/code]
So there needs to be a TBODY tag. Adding that in should do it.
Allan
Allan
$('#tableContainer').html('');
I took this from this example:
http://www.datatables.net/examples/data_sources/js_array.html
This way the markup only shows a div.
Remsy.
Allan