DataTables warning: table id={id} - Invalid JSON response.

DataTables warning: table id={id} - Invalid JSON response.

tester1tester1 Posts: 53Questions: 14Answers: 1
edited September 2014 in Free community support

I know " http://www.datatables.net/manual/tech-notes/1 "

But let know that same code and functionality is working properly on LOCALHOST without any error popup. but on my Online server i am getting above error message .. that to sometime i get and sometime it work perfectly .

Please let me know what will be issues

BELOW IS CODE :


var oTableL1 = $('#table1').dataTable({ "bProcessing": true, "bServerSide": true, "sAjaxSource": "includes/db/list_db.php", "fnServerParams": function ( aoData ) { aoData.push( { "name": "more_data", "value": "tablequeryone" } ); } }); //--------- var oTableL2 = $('#table2').dataTable({ "bProcessing": true, "bServerSide": true, "sAjaxSource": "includes/db/list_db.php", "fnServerParams": function ( aoData ) { aoData.push( { "name": "more_data", "value": "tablequerytwo" } ); } }); //--------- var oTableL3 = $('#table3').dataTable({ "bProcessing": true, "bServerSide": true, "sAjaxSource": "includes/db/list_db.php", "fnServerParams": function ( aoData ) { aoData.push( { "name": "more_data", "value": "tablequerythree } ); } });

Answers

  • tester1tester1 Posts: 53Questions: 14Answers: 1
    edited September 2014

    the thing is when i i refresh the page i get error message and when i close the error popup and refresh the same page , then i can see my data without any error .-- this on my online server issues.

    but in my local-host all working perfect ...

    using simple Server Side processing . with 3 tables ( in there resp. different tabs )

  • tester1tester1 Posts: 53Questions: 14Answers: 1

    ANY ONE HERE ?

  • tester1tester1 Posts: 53Questions: 14Answers: 1
    edited September 2014

    I have check my mysql JOIN QUERY ALSO its working fine ... but don't know why i m getting above error.. seriously help me some one ... FIRST TIME I GET ERROR AND IF I REFRESH THEN NO ERROR DATA IS SEEN PROPERLY .. BUT SUPPOSE I REFRESH THE PAGE THEN AGAIN ERROR IS SEEN AND IF I REFRESH THEN NO ERROR... I HAVE CHECK ALL QUERY .. IN MY LOCAL HOST ALL WORKING PROPERLY ONLY SERVER SIDE PRB

    PLEASE HELP ME MASTERSS

  • allanallan Posts: 61,761Questions: 1Answers: 10,111 Site admin

    Please link to a test case showing the issue, as required in the forum rules. The debugger is also available and can sometimes provide the information needed.

    The other thing is, have you following the instructions in the tech note the error links to?

  • allanallan Posts: 61,761Questions: 1Answers: 10,111 Site admin

    Btw:

    ANY ONE HERE ?

    There was only 1 hour between your first post and demand for help. You also didn't include a test case as required in the forum rules, as I stated. It was unlikely you would ever have gotten a helpful reply to be honest.

    Allan

  • tester1tester1 Posts: 53Questions: 14Answers: 1
    edited September 2014

    Hey Allan, first of all thanks for reply, frankly speaking i am not use of jsfiddle and other , also as i using my own modify serverside processing how i can link it with jsfiddle or with any other testcase link. as for demo purpose i have to show u my own mysql query .

    SORRY FOR THAT

    AS SAID : ALL WORKING PROPERLY IN MY LOCAL-HOST BUT ON MY ONLINE SERVER GETTING ERROR , AND THAT TO AFTER REFRESH OF PAGE I SEE MY DATA PROPERLY IN MY TABLE . BUT IF I LIVE THE PAGE OR REFRESH THEN AGAIN SAME ERROR, hence i have to refresh again..

    thanks.

    will see to use debugger tool it look great thanks once again for great support and datatables :)

  • allanallan Posts: 61,761Questions: 1Answers: 10,111 Site admin

    Okay - without a way to reproduce the problem and without full information about the issue we can't offer any help.

    The primary piece of information needed is what is coming back from the server that is not valid JSON. The tech note I mentioned, and linked to in the error, clearly states how you can find that information out.

    Allan

This discussion has been closed.