Table shifts down when user click a button with function call

Table shifts down when user click a button with function call

the_stigthe_stig Posts: 3Questions: 0Answers: 0
edited February 2010 in General
I'm obviously missing something simple. Here's my table:
[code]

...

136...
...




[/code]

Here's the JavaScript:
[code]
$(document).ready(function(){
$('#tblFac').dataTable();

$('#testx').click( function() {
oTable = $('#tblFac').dataTable();
} );
});
[/code]

Each click of the button causes the entire table to shift down a line and the wording outside of the table ("Show 10 entries", "Showing 1 to 10 of 16 entries") to replicate downwards. I have no CSS going on of my own. I have columnar sorting set up and it works fine. Any idea what I've messed up?

The test web page is at http://www.elarsen.net/temp/chkall/test_2.htm

Tested with FireFox, Chrome and Internet Explorer.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Wow DataTables 1.5 beta 11 :-). Time to upgrade!

    If you take a peak at this discussion ( http://datatables.net/forums/comments.php?DiscussionID=1446&page=1#Item_2 ) it talks about this issue. Basically you can't re-initialise a DataTable like this.

    Allan
  • the_stigthe_stig Posts: 3Questions: 0Answers: 0
    Huge thanks. It works great now.
This discussion has been closed.