Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35270

Ajax data in headers but not $_POST

$
0
0

I'm a student intern right now, and I've been stuck on this issue all week. I can't provide a link because it's behind a firewall for now, so I'll do my best to provide information.

I'm using ajax to pull from a db with the following datatables code:

$(document).ready(function(){
        $('#myTable').dataTable({
        "processing": true,
        "serverSide": true,
        "ajax": {"url": "ajax.php",
                 "type": "POST"},
        //"sServerMethod":"POST",
        'iDisplayLength': 10
        
        });
    });

The problem I'm having is the data that Datatables is automatically supposed to say, specifically the start and length. When it posts to my server sided script, I can see the data I want in the sent Headers:formdata:

columns[167][orderable]:true
columns[167][search][value]:
columns[167][search][regex]:false
order[0][column]:0
order[0][dir]:asc
start:0
length:10
search[value]:
search[regex]:false

But every example I see grabs the info from $_POST to dynamically query data. My $_POST only contains "draw" and all of the column data. Where are the parameters, like length and start that I can see are being sent, going?


Viewing all articles
Browse latest Browse all 35270

Trending Articles