Server-Side Processing fails to display in FireFox

Server-Side Processing fails to display in FireFox

jjjj Posts: 1Questions: 0Answers: 0
edited June 2010 in General
I'm new to DataTables, and am having difficulty getting DataTables to display valid JSON data in Firefox when using server-side processing.

In IE, the following works just fine:

JavaScript: [code]

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

[/code]

And my PHP:[code]
$aJSON = array();
$aJSON["sEcho"] = intval($_GET['sEcho']);
$aJSON["iTotalRecords"]=1;
$aJSON["iTotalDisplayRecords"]=1;
$aJSON["aaData"]=array(array("one","two","three","four","five"));

echo json_encode($aJSON);[/code]

However, in Firefox, I get the "JSON data from server failed to load or be parsed" alert box, then only "Loading data from server" is displayed along with the "Processing ... " div. Also, if I switch from a GET request to a POST request, the initial alert box doesn't display in Firefox, but nothing else changes in either browser.

I have confirmed using JSONlint that my JSON object that is being returned is valid:
{"sEcho":1,"iTotalRecords":1,"iTotalDisplayRecords":1,"aaData":[["one","two","three","four","five"]]}

Thanks for any help!

Replies

  • jfrcortezjfrcortez Posts: 1Questions: 0Answers: 0
    i have the same problem, and i need it in firefox. a'i new in jquery so please i need all the help you can give me. Thanks
  • chrisnetonlinechrisnetonline Posts: 1Questions: 0Answers: 0
    Are you guys using Firefox 4 beta? I was having this same issue and downgraded to Firefox 3.6.7 which fixed it for me.
This discussion has been closed.