Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Sorted it !, it turns out datatables is VERY strict about the html it accepts before it throws an error. I added tags to my html and now it is working, also note that you must have tags for your header columns and not tags as this also throws an error.</p> <p>The html code now looks like this :</p> <pre><code>&lt;h3&gt;Members of Staff&lt;/h3&gt; &lt;p&gt;If you're looking for a member of staff at Tower Road Academy, you'll find their details here.&lt;/p&gt; &lt;table class="staff_table" id="staff_table"&gt; &lt;thead&gt; &lt;tr class="staff_table_head"&gt; &lt;th&gt;Name&lt;/th&gt; &lt;th&gt;Job Title&lt;/th&gt; &lt;th&gt;Email Address&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;?php $result = mysql_query("SELECT * FROM itsnb_chronoforms_data_addstaffmember"); while($row = mysql_fetch_array($result)) { echo '&lt;tr&gt;'; echo '&lt;td&gt;' . $row['staff_name'] . '&lt;/td&gt;&lt;td&gt;' . $row['staff_job'] . '&lt;/td&gt;&lt;td&gt;&lt;a href=mailto:"' . $row['staff_email'] . '"&gt;' . $row['staff_email'] . '&lt;/a&gt;' . '&lt;/td&gt;'; echo '&lt;/tr&gt;'; } ?&gt; &lt;/table&gt; </code></pre> <p>and calling the jquery etc looks like this :</p> <pre><code>&lt;script src="./datatables/js/jquery.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script src="./datatables/js/jquery.dataTables.js" type="text/javascript"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; jQuery(document).ready(function() { jQuery('#staff_table').dataTable({ "bLengthChange": true, "bFilter": true, "bSort": true, "bInfo": true, "bAutoWidth": true } ); } ); &lt;/script&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload