querystring malformed on ajax get request

querystring malformed on ajax get request

Focker513Focker513 Posts: 10Questions: 4Answers: 0

I have a table defined like so:

var Id = parseInt($("#_Id").val()||0);
            
var table = $('#tblItems').DataTable({ 
                "processing": false,
                "serverSide": true,
                "autoWidth": false,
                "ajax": {
                    "url": "GetItemsById",
                    "type": "GET"
                    "data": { "id": Id }
                },
                "columnDefs": [
                 {
                     "targets": [0], 
                     "visible": false,
                     "searchable": false
                 },
                 {
                     "targets": [1], 
                     "visible": false,
                     "searchable": false
                 }],
                "columns": [
                   { "data": "Id" },
                   { "data": "ItemId" },
                   { "data": "ItemName" }
                  

                ]
            });

And when tracing the submission, the query string does not include the Id parameter but begins with draw and is populated with a ton of characters. Is there a specific configuration or setting that I am missing on the data table definition?
Here is a snippet of the query string
```

<?php draw=1&columns%5B0%5D%5Bdata%5D=Id ``` Thanks! ?>
This discussion has been closed.