Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 81925

AJAX loads a pure HTML Table, how to send it to datatables

$
0
0

Hallo and sorry for that noob question. I looked around here in the forum and cant find a solution for my problem.

I am a php developer with not much experience in javascript.

i do habe a ajax script, which is used in a wordpress page to load a table in an tab of the page.
The ajax script is working fine and delivers the table as it should. But i cant find a way to do the reformatting with datatables.

Here is my ajax script:
<script type="text/javascript"> <!-- function swapContent(cv1, cv2, cv3, cv4, cv5, cv6){ $("#standingsoutput").html('<img src="loader.gif">').show(); var url = "standingsloader.php"; $.post(url, {Var1: cv1, Var2: cv2, Var3: cv3, Var4: cv4, Var5: cv5, Var6: cv6},function(data){ $("#standingsoutput").html(data).show(); }); } --> </script>)

The standingsoutput is the div tag who will get the table (and refresh it with parameters). Is there a way to do format the table with datatables after reload the area with ajax, and before shows it on the page?


Viewing all articles
Browse latest Browse all 81925

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>