数据表“nCell未定义”错误与有效的XHTML [英] DataTables "nCell is undefined" error with valid XHTML

查看:162
本文介绍了数据表“nCell未定义”错误与有效的XHTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

DataTables 1.9.3与jQuery 1.8.1在一个验证的(XHTML 1.0 Transitional,ISO-8859-1编码)页面上,我正在尝试使用它,并显示以下消息页面准备就绪:

DataTables 1.9.3 with jQuery 1.8.1 dies on a validated (XHTML 1.0 Transitional, ISO-8859-1 encoded) page where I'm trying to use it, with the following message at page ready:


TypeError:nCell未定义

TypeError: nCell is undefined

数据表可以处理的表中是否有大小限制?这是我已经尝试过的最大的页面,几乎700KB(主要是因为嵌入式样式),一个> 520行,一个> 160行。它也在同一个较小版本上失败表。两个表都有 可排序,一个包含复选框,另一个包含单选按钮 ,并且都有一个 < thead> < tbody> 部分。不幸的是,由于数据是公司内部的,我无法发布整个页面,但我会尝试创建一个最小的样本。

Is there perhaps a size limit to the tables DataTables can handle? It's the biggest page I've tried yet, almost 700KB (mainly because of embedded styles), with one table of >520 lines and one with >160 lines. It also fails on a smaller version of the same table. Both tables have the sortable class, one contains checkboxes and the other contains radio buttons, and both have a single <thead> and <tbody> section. Unfortunately I can't post the full page since the data is company internal, but I'll try to create a minimal sample.

DataTables初始化代码:

DataTables initialization code:

$(document).ready(function(){
    $('.sortable').dataTable({
        "aaSorting": [],
        "bFilter": false,
        "bInfo": false,
        "bPaginate": false,
    });
});


推荐答案

结果DataTables不知道该怎么做表中最后一行的 @colspan - 我不得不将其内容移到表之外,然后删除该行工作。

Turns out DataTables doesn't know what to do with a @colspan in the last line of the table - I had to move the contents of it outside the table, and remove the row, then it worked.

这篇关于数据表“nCell未定义”错误与有效的XHTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆