こんにちは私はDataTableにJSONデータを表示するのに問題があります。私はデータへのURLを持っており、すべての結果を表示したい。エラーは返されませんが、JSONのデータはテーブルにロードされません。私が使用しているjavaScriptのHTML & JSONを添付します。伝説が私を助けてくれることを願っています!DataTables Ajaxデータが表示されない
jQueryの
$('#example').DataTable({
"ajax": ({
"url": fxml_url + 'Enroute' + '/airport' + $('#flight_choice').val(),
}),
"columns": [
{ enroute: ident },
{ enroute: originCity },
{ enroute: destinationCity },
{ enroute: estimatedarrivaltime }
]
});
HTML
<table id="example" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>Flight No.</th>
<th>Origin</th>
<th>Destination</th>
<th>Arrival Time</th>
</tr>
</thead>
</table>
JSON構造
あなた 'columns'を宣言正しい。 * 'enroute' *のような属性はありません。あなたは' data'を意味すると思います... – davidkonrad
ああ、ありがとう、それでもデータは表示されません!ログに「identが定義されていません」と表示されますか? – giofus