Welcome Guest, Not a member yet? Register   Sign In
Not showing table properly

I'm trying to create a page for my site with the table attached and for some reason it's not attaching the datatables to it.

My page: http://www.kansasoutlawwrestling.com/kow...almessages

Template: http://kansasoutlawwrestling.com/files/t...ables.html


<?php echo heading('Inbox Messages', 2, 'class="grid_12"'); ?>
<div class="clear"></div>
<div class="grid_12">
    <div class="box">
        <div class="header">
            &lt;?php $image_properties= array( 'src' => 'assets/peach/img/icons/16x16/user.png', 'height' => '16px', 'width' => '16px', 'alt' => 'User' ); ?&gt;
            &lt;?php echo img($image_properties); ?&gt;
            &lt;?php echo heading('Inbox', 3); ?&gt;
        <div class="content">
            &lt;?php $this->table->set_empty('&nbsp;'); ?&gt;
            &lt;?php $tmpl = array ( 'table_open'  => '<table id="table-example" class="table">' ); ?&gt;
            &lt;?php $this->table->set_template($tmpl); ?&gt;
            &lt;?php $this->table->set_heading('', 'Subject', 'From', ''); ?&gt;
            &lt;?php echo $this->table->generate(); ?&gt;

You need to pass your data into it.
&lt;?php echo $this->table->generate($data); ?&gt;

Besides ll table code should be in your controller except for the table_generate!

Nice site btw

What data are you talking about insiteFX?

can you put the <tbody> part and some data in there manually for now so we can troubleshoot the datatable issue
it's a a java issue.
then check inserting the data dynamically...

I updated the table and for some reason still not loading the datatables into the table.

Any ideas why it doesn't turn it into a datatable when it should be?

check myjs.js
$(window).load(function() {
// you got a syntax error here

try instead

$(document).ready( function () {

  //check if the datatable table exist.

    if ($("#datatable").length > 0){
     //apply dataTable to #datatable table and save its object in dataTable variable
if( typeof dataTable == 'undefined' ){
     dataTable = $( '#datatable' ).dataTable();
// this two lines to help redraw the table if you add or remove lines
  dataTable.fnClearTable( 0 );



Theme © iAndrew 2016 - Forum software by © MyBB