jquery.dataTables.min.js:36 Uncaught TypeError: Cannot read property 'length' of undefined
jquery.dataTables.min.js:36 Uncaught TypeError: Cannot read property 'length' of undefined
alexkrush
Posts: 3Questions: 1Answers: 0
Hi all
having following html:
Url Edit
|
Risk
|
Tool Number
|
Tool T R H Id
|
---|---|---|---|
Url Edit
|
Risk
|
Airbus Tool Number
|
Tool T R H Id
|
<script type="text/javascript">
$(document).ready(function () {
// Init DataTables
var oTable = $('#Tools').DataTable({
"processing": true,
"serverSide": true,
"ajax": "/TR/GetTRData?toolTRHId=14"
});
});
</script>
and following json from link "/TR/GetTRData?toolTRHId=14":
[{"UrlEdit":"/TR/EditTR?toolTRHId=14","Risk":"","ToolNumber":"T000600500","ToolTRHId":14},{"UrlEdit":"/TR/EditTR?toolTRHId=14","Risk":"","ToolNumber":"T000600501","ToolTRHId":14}]
I'm getting the Uncaught TypeError.
Where I'm wrong?
Thanks a lot for help.
Alexander
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Sorry, Repost with correct format:
and following json from link "/TR/GetTRData?toolTRHId=14":
[{"UrlEdit":"/TR/EditTR?toolTRHId=14","Risk":"","ToolNumber":"T000600500","ToolTRHId":14},{"UrlEdit":"/TR/EditTR?toolTRHId=14","Risk":"","ToolNumber":"T000600501","ToolTRHId":14}]
I'm getting the Uncaught TypeError. Where I'm wrong? Thanks a lot for help. Alexander
I've got it solved with
http://farm-fresh-code.blogspot.de/2012/02/mvc-jquery-ui-and-datatable-pluginajax.html
and https://github.com/ALMMa/datatables.mvc
Hi,
Good to hear you have got it fixed now. In future, could you please link to a test page showing the issue so we can help to debug it.
Regards,
Allan