I have two Array objects, one an HTML element: tr
, one a DataTables object: row
. The row
is defined here: https://datatables.net/reference/api/row()
Here is how I am passing these objects in jQuery:
$.post('storeTable.php',
{
'tr': tr,
'row': row
},
function(status) {
console.log("Status: " + status);
});
And this is how my PHP catches them:
<?php
$tr = $_POST['tr'];
$row = $_POST['row'];
?>
According to jQuery documentation, I should be able to pass abstract objects like these arrays in this manner, but I get these errors:
The error on line 414 the log is referring to is the line
$.post('storeTable.php',
Is there specific syntax or constraint on functionality I'm not aware of in this case? I have passed data in this way many times before, but never using full arrays.