I want to load data into a jquery datatable with ajax. Also I want to send parameters to the function that pulls the data from the database.
So what I want to do:
$('#datatables').dataTable( {
    "bProcessing": true,
    "bServerSide": true,
    "sAjaxSource": "/results/load-results",
    "fnServerParams": function ( aoData ) {
        aoData.push( { "quizid": quizid, "questionid": qid } );
    }
} );
I want to so send the quizid and questionid and use them in my function. How can I pull them in my function? Tried $_GET but didn't work ..
Format must be
"fnServerParams": function ( aoData ) {
      aoData.push( { "name": "quizid", "value": quizid },{ "name": "questionid", "value": qid } );
},
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With