Table tools not work for me

Table tools not work for me

rage10940rage10940 Posts: 48Questions: 0Answers: 0
edited February 2013 in General
Hello all, I finally got table tools to "work" on my application but I am having a couple problems. And first place I thought to com was here in hopes that my problems can be mediated.

This is my script :
[code]






$(document).ready( function () {
$('#why').dataTable( {
"sDom": 'T<"clear">lfrtip'
} );
} );


@import "core/media/css/demo_table.css";
@import "core/media/css/TableTools.css";


* {
font-family: arial;
}

[/code]

I am using the examples to use a basic installation (that is all I need atm) however, I am having troubles with this.

First problem : Only the print button works.
Second problem the look of the table is no where near how the example looks.
example: http://datatables.net/release-datatables/extras/TableTools/

my table : http://img811.imageshack.us/img811/8810/selection001k.png

The code to my table (html and php) is like so :

[code]




Reason For Visit
Number Of Visits
Average Student Visit Time



<?php
foreach($result as $row) {
?>

<?=$row['Reason For Visit'] ?>
<?=$row['Total Visits'] ?>
<?=$row ['Average Session Time'] ?>

<?php
}
?>



[/code]
Can any one help me please?

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    1. What does the console in your browser report?

    2. Please link to a test case: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read

    Allan
  • rage10940rage10940 Posts: 48Questions: 0Answers: 0
    http://live.datatables.net/oqajen/edit#javascript,html

    Sorry about the here you go.

    I am using php in the foreach to populate my rows.

    THe PHP code is in the OP.
  • rage10940rage10940 Posts: 48Questions: 0Answers: 0
    Sorry but what do you mean console? This is my first time taking a plunge into client side scripting.
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    The console will show you 404 and Javascript errors, among others. For example I can tell you that your 'live' page has 7 404 errors for files not found (so it won't really help me address your issue).

    Firebug:
    http://michaelsync.net/2007/09/08/firebug-tutorial-overview-of-firebug
    http://css-tricks.com/video-screencasts/15-introduction-to-firebug/

    Chrome Dev tools are superb - google for tutorials on them as well.

    Allan
  • rage10940rage10940 Posts: 48Questions: 0Answers: 0
    Well it has 7 errors because I have a bunch of php includes. That is not the problem though. I rolled back everything to just using the datatables theme and it all works fine. My problem comes in when trying to implement table tools. I followed the tutorial. I included the tabletools.js and the demo theme, same as you have it on your page and I get errors.
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    If you link me to the page, I'll tell you what is wrong with it. Likely there is a 404 error on the swf file.

    Allan
  • rage10940rage10940 Posts: 48Questions: 0Answers: 0
    I can't link you as it is in a localhost environment.
  • rage10940rage10940 Posts: 48Questions: 0Answers: 0
    Do you use join.me?
This discussion has been closed.