executing PHP in Column via .DataTable()
executing PHP in Column via .DataTable()
dejanjuergenwolf
Posts: 3Questions: 2Answers: 0
Hi,
I want to execute a PHP code in a column.
I've tried this:
var atable = $('#dataAddressTable').DataTable({
draw: $('.userExist').html( $.get( "template.checkUserExist.php" ) ),
[....]
});
but the Code runs only on the first Page.
This discussion has been closed.
Answers
There isn't a
draw
initialisation option, so I'm not actually sure what that code is doing. I think it is writing an Ajax object into your.userExist
elements since$.get
is async (unless you have changed that else where).Do you want to run that for every row? I'd really recommend against making an Ajax request for every row. Can you not just include that data in the HTML or JSON (depending on how it is being loaded - without a test case, I've not not much information to go on).
Allan
hey Allen and thank you for your reply,
I got
deferRender: true
andscroller: true
, so when I put the code indefaultContent
it will display the code as text on the further pages. And the table data comes from a JavaScript Array.And yes I want to run in for every row.