Having issues with sorting
Having issues with sorting
I ran the debuger, but I didn't get any unique number to post :(
I have a very simple page I'm using to test this. The table has only two rows. Unfortunately the sorting buttons do nothing.
=============
<?php
session_start();
require_once './includes/connect.php';
<?php > ?><head>
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.2/css/jquery.dataTables.css">
<SCRIPT language="Javascript">
$(document).ready(function() {
$('#table_id').dataTable( {
"aaSorting": [[ 4, "desc" ]]
} );
} );
</SCRIPT>
</head>
<?php
echo "
| Name | "; echo "Type | "; echo "Rank | "; echo "Class | "; echo "City | "; echo "Birthday | "; echo "Joined | "; echo "
|---|---|---|---|---|---|---|
| $person_first_name $person_last_name | "; echo "$person_type | "; echo "$person_rank | "; echo "$person_class | "; echo "$person_city | "; echo "$person_birthday | "; echo "$person_join_date | "; } echo "
";
<?php > ?></body>
</html>
This discussion has been closed.
Answers
Your code makes no reference to either the jQuery or DataTables js files.
Not sure what happened, but it was there. Something wrong with the paste.
================
<?php
session_start();
require_once './includes/connect.php';
<?php > ?><head>
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.10.2/css/jquery.dataTables.css">
<SCRIPT language="Javascript">
$(document).ready(function() {
$('#table_id').dataTable( {
"aaSorting": [[ 4, "desc" ]]
} );
} );
</SCRIPT>
</head>
<?php
echo "
";
<?php > ?></body>
</html>
When I post it, it's removed, but I have references to
//code.jquery.com/jquery-1.10.2.min.js
//cdn.datatables.net/1.10.2/js/jquery.dataTables.js
I uploaded a live copy - http://thehonorsquad.com/datatables/
Anyone have any ideas?