sAjaxSource not hitting the server url

sAjaxSource not hitting the server url

arunaaruna Posts: 2Questions: 0Answers: 0
edited May 2013 in DataTables 1.8
sAjaxSource not hitting the server url , i am not sure what happening, i am first time using datatables, below url is correct , but not hitting the url through sAjaxSource . i am not sure what i am missing, Your kind help will be greatly appreciated
$(document).ready( function() {
var table = $('#reportTable').dataTable({
"aLengthMenu" : [ [ 10, 25, 50, -1 ], [ 10, 25, 50, "All" ] ],
"bSort" : true,
"sPaginationType" : "full_numbers",
"aaSorting" : [ [ 0, 'desc' ] ],
"bProcessing" : true,
"bStateSave" : true,
"sDom" : sDom,
"oTableTools" : oTableTools,
"oLanguage" : oLanguage,
"sAjaxSource" : "http://localhost:8081/report/reportResultsListJsonData?id=1",
"bServerSide" : true

});
} )

Replies

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Looks like it should work to me. Please link to a test case.

    Allan
  • arunaaruna Posts: 2Questions: 0Answers: 0
    Thanks Allan, for quick response , i found below error in console, that could be the reason it is not hitting the server URL.

    Uncaught TypeError: Cannot read property 'asSorting' of undefined

    in jquery.datatables.js , i am seeing error at below line,

    /* Set the current sorting index based on aoColumns.asSorting */
    for ( j=0, jLen=oColumn.asSorting.length ; j
  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Yes - likely that is it. I'd guess there error is that you have an empty row in the tbody.

    Allan
This discussion has been closed.