[newbie question] datatable not working
[newbie question] datatable not working
Hi, My first post on here and I'm a newbie to this.
I am developing a PHP website which is going to take values from a database and display it inside a datatable. The data I can get just fine, but the functionality of the Datatable isn't there (No filtering/pagination etc). I am also using twitter bootstrap for the layout.
Code:
[code]
@import "css/jquery.dataTables.css";
$(document).ready( function(){
$('#the_table').dataTable();
});
[/code]
Code in Body:
[code]
***SQL Connection and Select Statements***
Customer Order Number
Sales Order Number
Order Date
Order Status
Order Details
<?php
while ($row = mysql_fetch_array($dbrs))
{
?>
<?php echo $row['CustomerOrderNumber']; ?>
<?php echo $row['SalesOrderNumber']; ?>
<?php $timestamp = strtotime($row['OrderDate']); echo date('d/m/Y', $timestamp); ?>
<?php echo $row['OrderStatus']; ?>
View Order Details » <?php echo $row['SalesOrderNumber']; ?>
<?php
}
?>
[/code]
What am I doing wrong? Any help is really Appreciated :)
I am developing a PHP website which is going to take values from a database and display it inside a datatable. The data I can get just fine, but the functionality of the Datatable isn't there (No filtering/pagination etc). I am also using twitter bootstrap for the layout.
Code:
[code]
@import "css/jquery.dataTables.css";
$(document).ready( function(){
$('#the_table').dataTable();
});
[/code]
Code in Body:
[code]
***SQL Connection and Select Statements***
Customer Order Number
Sales Order Number
Order Date
Order Status
Order Details
<?php
while ($row = mysql_fetch_array($dbrs))
{
?>
<?php echo $row['CustomerOrderNumber']; ?>
<?php echo $row['SalesOrderNumber']; ?>
<?php $timestamp = strtotime($row['OrderDate']); echo date('d/m/Y', $timestamp); ?>
<?php echo $row['OrderStatus']; ?>
View Order Details » <?php echo $row['SalesOrderNumber']; ?>
<?php
}
?>
[/code]
What am I doing wrong? Any help is really Appreciated :)
This discussion has been closed.
Replies
Are the js files in the right location on your server?
Do you get any errors in console?
Allan