themeroller with php dynamic table

themeroller with php dynamic table

jwebdesjwebdes Posts: 2Questions: 0Answers: 0
edited March 2011 in General
Hi Allan, thanks for the great work.
I'm using php to open a csv file and create my table. It works great with your default styling, but I can't seem to get themeroller to load. I followed your very helpful examples, but I seem to be missing something. Thanks in advance.
My code:

[code]

table

@import "../media/css/demo_page.css";
@import "../media/css/demo_table_jui.css";
@import "../media/themes/smoothness/jquery-ui-1.8.4.custom.css";




$(document).ready(function() {
oTable = $('#example').dataTable({
"bJQueryUI": true,
"sPaginationType": "full_numbers"
});
} );






Live example




Part Number
Brand
Finish
Size
ET
PCD
Hub
QTY
Price



<?php
$first = true;
//gets csv file
if ($f = fopen("overstock_current.csv", "r")){
while($l=fgetcsv($f)){
//ignore first line of csv
if ($first) {
$first = false;
continue;
}

echo "\n";
}
fclose($f);
}
?>




[/code]

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    You code looks fair - the only thing I can think of would be a file loading error. If you have a look at your server error log, does it show any 404 errors or anything?

    Allan
This discussion has been closed.