0
私は、データテーブルServer Sideを使用して、私のウェブサイト上にページテーブル付きのMySQLテーブルを生成しています。DataTablesのcolumns.renderオプションが複数の列で機能しなくなるのはなぜですか?
私はそうのようなMySQLの列のいずれかにハイパーリンクを追加するにはrenderオプションを使用しています:
$(document).ready(function() {
$('#example').DataTable({
"processing": true,
"serverSide": true,
"ajax": "includes/pull_2.php",
"columns": [
{
"render": function (data, type, full, meta) {
return "<a href=" + full[0] + ">" + full[0] +"</a>"; }
}
]
});
});
私は私のテーブル内の1つの列を持っている場合、これは完璧に動作します。たとえば:
<table id="example" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>First Name</th>
</tr>
</thead>
<tfoot>
<tr>
<th>First Name</th>
</tr>
</tfoot>
</table>
しかし、できるだけ早く私は、テーブルに配列し、別の<th>
に別の列を追加すると、テーブルには、すべてのテーブルをレンダリングし、単に「処理」とは言い停止します。 http://clients.serallo.co.uk/formtest/
誰が予想通り、これは動作しない理由として提案を持っています:
これは、私が働いているテーブルのですか?