Having problem adding column to index.php page
Having problem adding column to index.php page
Trying to put together a server-side page for our department at work.
Got the thing going, except for one thing.
I've got the first 9 columns of the db set up but when I add another <th>Column</th> to the index page, it quits. I get the popup for "DataTables warning: table id=tbl-contact - Ajax error. For more information about this error, please see http://datatables.net/tn/7"
The server script page works fine, just chokes when I add the last column to the index page.
Any ideas what I'm missing here? I'm sure it's something simple. I need to add more columns, other than that it's working great!
W-
Answers
Its hard to say without seeing the problem. Did you follow the troubleshooting steps in the link?
http://datatables.net/tn/7
Likely you will need to troubleshoot the server script to find the problem.
Kevin
On the "server.php" page I have this:
$columns = array(
array( 'db' => 'Prod_Cat_1', 'dt' => 0 ),
array( 'db' => 'Prod_Cat_2', 'dt' => 1 ),
array( 'db' => 'Vendor', 'dt' => 2 ),
array( 'db' => 'Device', 'dt' => 3 ),
array( 'db' => 'DOA', 'dt' => 4 ),
array( 'db' => 'name', 'dt' => 5 ),
array( 'db' => 'age', 'dt' => 6 ),
array( 'db' => 'email', 'dt' => 7 ),
array( 'db' => 'Alt4', 'dt' => 8,),
array( 'db' => 'Alt5','dt' => 9,
)
);
And it works... with this on the index.php file:
But when I try and add the last <th>Alt Name 5</th> it quits.
What did you find with the troubleshooting steps provided in the technote?
http://datatables.net/tn/7
Your code snippets aren't enough to troubleshoot the problem. can you post a link to your page so we can take a look?
Kevin
Thanks for looking.... unfortunately I can't post a link because it's on a work server behind a firewall.
Just can't figure out why the last column won't display and gives me a "404 Not found" error when it's in the Array with the rest of them. And I don't get an error on the server.php file, just on the index.php file when I try to add another column.
Makes no sense... maybe it's time for a dinner break?
The 404 not found is coming from the server. You will need to look at your server logs to find out why its providing that resposne.
Kevin
10-4 Thanks!