"Loading data from server"

"Loading data from server"

garci00garci00 Posts: 3Questions: 0Answers: 0
edited August 2011 in General
I am new using datatables and i need some help. My server-side.php file returns a valid json i have validated (100%). In my presentacion.html i have:

[code]

IP

@import "demo_page.css";
@import "demo_table.css";




$(document).ready(function() {
$('#ip').dataTable( {
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "server_side.php"
} );
} );










usuario
nombrecompleto
ipactual




Loading data from server




usuario
nombrecompleto
ipactual







[/code]

and i am getting Loading data from server message. I supose it would be a very basic error due to my inexperience.

Thank you in advance for your help.

Replies

  • garci00garci00 Posts: 3Questions: 0Answers: 0
    My server-side.php returns:

    {"sEcho":0,"iTotalRecords":"71","iTotalDisplayRecords":"71","aaData":[["jskslsj","xxxx-xxxx","x.x.x.x"],...MORE RECORDS...,["abcde","abcde","y.y.y.y"]]}

    with 71 records
  • garci00garci00 Posts: 3Questions: 0Answers: 0
    SOLVED: i have changed:

    "sAjaxSource": "server_side.php" for:

    "sAjaxSource": "http://xxx.xx/xxx/server_side.php"

    and it works. I dont understand why but its working. (presentacian.html and server-side.php were in the same folder... thank you
  • aaronwaaronw Posts: 89Questions: 3Answers: 4
    I don't think it's your problem necessarily, but you refer sometimes to 'server-side.php' and sometimes to 'server_side.php'.
    You might have been accidentally blocking yourself with some cross site 'protection' mechanism... but I'm not sure.
  • GregPGregP Posts: 500Questions: 10Answers: 0
    Could just be that the link wasn't provided with the right relative or absolute structure.

    "/xxx/server_side.php" would probably also work if you want to try it; then you don't have to fully qualify the URL.
This discussion has been closed.