Cant get sAjaxSource and sAjaxDataProp to start working
Cant get sAjaxSource and sAjaxDataProp to start working
Hi,
I have a problem with getting the data from a sAjaxSource. i Use a website as a sAjaxSource
I have trying the sAjaxDataProp nested properties but that doesnt work.
Can someone help me out.
Here is my code for the datatable:
[code]
$(document).ready(function() {
$('.dataTable').dataTable( {
"sDom": 'frtip',
"sPaginationType": "bootstrap",
"oLanguage": {
"sZeroRecords": "No Data Found - Sorry!",
},
"iDisplayLength": 5,
"bProcessing": true,
"sAjaxSource": "http://example.com/datafetcher/test/example",
"sAjaxDataProp": "example-com.test.data"
} );
} );
[/code]
Here is the array i use:
I have more data in my array, this is just a example
[code]
{
"example-com": [{
"test": {
"label": "test",
"data": [
[20, 45],
[21, 45],
[22, 45]
]
}
[/code]
I have a problem with getting the data from a sAjaxSource. i Use a website as a sAjaxSource
I have trying the sAjaxDataProp nested properties but that doesnt work.
Can someone help me out.
Here is my code for the datatable:
[code]
$(document).ready(function() {
$('.dataTable').dataTable( {
"sDom": 'frtip',
"sPaginationType": "bootstrap",
"oLanguage": {
"sZeroRecords": "No Data Found - Sorry!",
},
"iDisplayLength": 5,
"bProcessing": true,
"sAjaxSource": "http://example.com/datafetcher/test/example",
"sAjaxDataProp": "example-com.test.data"
} );
} );
[/code]
Here is the array i use:
I have more data in my array, this is just a example
[code]
{
"example-com": [{
"test": {
"label": "test",
"data": [
[20, 45],
[21, 45],
[22, 45]
]
}
[/code]
This discussion has been closed.
Replies
Allan
How do i get the data example-com in the second row of the table?
[code]
20
example-com
45
[/code]