Ajax Example not working

Ajax Example not working

Fyb3roptikFyb3roptik Posts: 9Questions: 0Answers: 0
edited August 2012 in General
I have tried to implement the AJAX example given on your site. The JSON is formatted correctly, but all I see on my end is the Processing part. Console reports nothing.

[code]



Preview
Manufacturer
Model
Ton
Year
Location
Price





[/code]

[code]
$(document).ready(function(){
$('#datatablesNewSearchListings').dataTable({
"oLanguage": {
"sSearch": "Search all columns: "
},
"bJQueryUI":true,
"sScrollY": "600px",
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/includes/search/searchAjax.php?q=<?php echo $_REQUEST['q']; ?>&category=<?php echo str_replace(" ", "+", $_REQUEST['category']); ?>&capacity_floor=<?php echo $_REQUEST['capacity_floor']; ?>&capacity_ceiling=<?php echo $_REQUEST['capacity_ceiling']; ?>"
});
[/code]

Replies

  • Fyb3roptikFyb3roptik Posts: 9Questions: 0Answers: 0
    What I really mean is. The table rows are not writing. Is there something extra that is not in the examples that you have to do?
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    What is the JSON return from the server?

    It would be really helpful if you could run your table through the DataTables debugger and give us the unique debug code please.

    Allan
  • Fyb3roptikFyb3roptik Posts: 9Questions: 0Answers: 0
    I solved my issue. I was returning sEcho when it was not being sent by the client. Hope this helps someone
This discussion has been closed.