How to only have 1 php file and not define the ajax setting?

How to only have 1 php file and not define the ajax setting?

wyatt121wyatt121 Posts: 9Questions: 1Answers: 0
edited January 2016 in Free community support

Hi,

I am attempting to display dynamic datatables on the fly depending upon user selection. My setup looks similar to this...

index.php calls index.js which calls datatables.php

The problem with this setup is that I cannot pass dynamic variables from index.php through index.js to datatables.php. I hope this makes sense...

Anyhow, if I can somehow merge my index.php with datatables.php I won't have these issues. I can do whatever I want.

Yet, I'm stuck on this "ajax" setting...

var table = $('#prosp_rawdata').DataTable( {
                dom: 'Bfrtip',
                ajax: 'php/datatables.php',

If my ajax code is already included within index.php and not datatables.php since I merged both files.., what do I do with this ajax setting? Leave it blank? Set it to index.php?

Any help is much appreciated...

Regards,

Wyatt

This discussion has been closed.