I am newbee, trying to use tabale with ajasource. Its not working, please advide whats wrong
this is the error in chrow console
please advice me how to fix this.
<html> <head> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://datatables.net/download/build/jquery.dataTables.js"></script> <link rel="stylesheet" type="text/css" href="http://localhost:8080/springrest/css/demo_page.css" /> <link rel="stylesheet" type="text/css" href="http://localhost:8080/springrest/css/demo_table.css" /> <script type="text/javascript"> $(document).ready(function() { $('#displayData').dataTable( { "bProcessing": true, "bServerSide": true, "sAjaxSource": "http://localhost:8080/springrest/rest/service/cities.json" } ); } ); </script> </head> <body> <table class="display" id="displayData"> <thead> <tr> <th align="left">Name</th> <th align="left">Telephone Code</th> <th align="left">Population</th> </tr> </thead> <tbody> <tr> <td colspan="3" class="dataTables_empty">Loading data from server</td> </tr> </tbody> </table> </body> </html>
this is the error in chrow console
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.
please advice me how to fix this.