#Urgent!!!#cannot read property 'length' of undefined
#Urgent!!!#cannot read property 'length' of undefined
VincentGeng
Posts: 4Questions: 0Answers: 0
I have tried many ways to do the server-side processing but still got this problem
The following is my code
JSON data packetTransmissionLogJsonData.web
{
"iTotalRecords": 16,
"iTotalDisplayRecords": 16,
"aaData": [
{
"transmissionId": 1,
"deviceId": "Vincent-iPhone6",
"filename": "D://javasrc/abc/data/out/Apple.jpg",
"packetId": "1",
"dispatchtime": "Sep 25, 2014 4:00:10 PM",
"receipttime": "Sep 25, 2014 4:00:11 PM",
"chunklist": "1",
"chunksize": 100000,
"connectiontype": "wifi",
"lat": 1.335507,
"lon": 103.736957,
"transmitterid": "null",
"speed": 0.0,
"cellid": "null",
"signalstrength": 0.0
},
{
"transmissionId": 2,
"deviceId": "Noel-iPhone6",
"filename": "D://javasrc/abc/data/out/Samsung.jpg",
"packetId": "5",
"dispatchtime": "Sep 25, 2014 4:00:01 PM",
"receipttime": "Sep 25, 2014 4:00:11 PM",
"chunklist": "5",
"chunksize": 200000,
"connectiontype": "wifi",
"lat": 1.335482,
"lon": 103.739845,
"transmitterid": "null",
"speed": 0.0,
"cellid": "null",
"signalstrength": 0.0
},
...
}
JS
oTable = $('.data-table').dataTable({
"oLanguage": {
"sSearch": "Search all columns:"
},
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"sDom": '<""l>t<"F"fp>',
"bServerSide": true,
"sAjaxSource": "packetTransmissionLogJsonData.web",
"bProcessing": true,
"aoColumns": [
{ "mData": "transmissionId" },
{ "mData": "deviceId" },
{ "mData": "filename" },
{ "mData": "packetId" },
{ "mData": "dispatchtime" },
{ "mData": "receipttime" },
{ "mData": "chunklist" },
{ "mData": "chunksize" },
{ "mData": "connectiontype" },
{ "mData": "lat" },
{ "mData": "lon" },
{ "mData": "transmitterid" },
{ "mData": "speed" },
{ "mData": "cellid" },
{ "mData": "signalstrength" },
]
});
JSP
<div class="widget-box">
<div class="widget-title">
<span class="icon"><i class="icon-th"></i></span>
<h5>Packet Trsansmission Log List</h5>
</div>
<div class="widget-content nopadding">
<table id="packetTransmissionLogList" class="table table-bordered table-striped table-hover data-table DTTT_selectable">
<thead>
<tr>
<th width="2%">Transmission ID</th>
<th width="11%">Device ID</th>
<th width="8%">File Name</th>
<th width="8%">Packet ID</th>
<th width="8%">Dispatch Time</th>
<th width="8%">Receipt Time</th>
<th width="2%">Chunk List</th>
<th width="2%">Chunk Size</th>
<th width="8%">Connection Type</th>
<th width="8%">Lat</th>
<th width="8%">Lon</th>
<th width="8%">Transmitter ID</th>
<th width="8%">Speed</th>
<th width="8%">Cell ID</th>
<th width="8%">Signal Strength</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
This discussion has been closed.
Replies
Somebody helps! @_@
Help! @allan
Help! @allan
Hi,
Please link to a test page that shows the problem. If you require urgent help priority support is available.
Allan