newbee using dattable
newbee using dattable
fachhoch
Posts: 1Questions: 0Answers: 0
I am newbee, trying to use tabale with ajasource. Its not working, please advide whats wrong
[code]
$(document).ready(function() {
$('#displayData').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "http://localhost:8080/springrest/rest/service/cities.json"
} );
} );
Name
Telephone Code
Population
Loading data from server
[/code]
this is the error in chrow console
[code]
XMLHttpRequest cannot load http://localhost:8080/springrest/rest/service/cities.json?sEcho=4&iColumns=…gCols=1&bSortable_0=true&bSortable_1=true&bSortable_2=true&_=1364326752076. Origin null is not allowed by Access-Control-Allow-Origin.
[/code]
please advice me how to fix this.
[code]
$(document).ready(function() {
$('#displayData').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "http://localhost:8080/springrest/rest/service/cities.json"
} );
} );
Name
Telephone Code
Population
Loading data from server
[/code]
this is the error in chrow console
[code]
XMLHttpRequest cannot load http://localhost:8080/springrest/rest/service/cities.json?sEcho=4&iColumns=…gCols=1&bSortable_0=true&bSortable_1=true&bSortable_2=true&_=1364326752076. Origin null is not allowed by Access-Control-Allow-Origin.
[/code]
please advice me how to fix this.
This discussion has been closed.
Replies
header('Access-Control-Allow-Origin: *');