DataTables - TableTools - Jquery UI Accordion

DataTables - TableTools - Jquery UI Accordion

compuwizard123compuwizard123 Posts: 5Questions: 0Answers: 0
edited July 2011 in TableTools
I am working with DataTables and TableTools and trying to place it inside a Jquery UI Accordion. I have used the example for Jquery UI Tabs and that works correctly. I have modified that example for accordion and it gives me js errors "this.movie.clearText is not a function". I have the test case hosted here http://kevin.risden.net/jquery_DataTables/accordion.html and the base example stripped down here http://kevin.risden.net/jquery_DataTables/tabs.html As you can see the tabs example works correctly but the accordion does not. Any help would be greatly appreciated.

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    Your accordion version worked for me (Chrome 12.0.742.122, Windows XP), as well as the tab version.

    Which browser are you running?
  • compuwizard123compuwizard123 Posts: 5Questions: 0Answers: 0
    I am using Firefox 5.0. Thanks for the quick response. I can confirm it works in Chrome and Internet Explorer 9 as well.
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    It mostly worked on my FireFox 5 (some of the Tabletools buttons did not work - CVS, Excel.. maybe I don't have Flash installed?)
  • compuwizard123compuwizard123 Posts: 5Questions: 0Answers: 0
    The TableTools buttons is what doesn't work. If you goto the tabs.html example, the TableTools buttons work correctly.
  • compuwizard123compuwizard123 Posts: 5Questions: 0Answers: 0
    edited July 2011
    I found that if you open the accordion the first time the TableTools buttons do not work. But if you close the accordion and then open it again the TableTools buttons then work correctly.
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    There's definitely issues with ZeroClipboard and FireFox

    ZeroClipboard.js: 281 they try to work around some FireFox limitations, but apparently it doesn't work (anymore?) and functions added to the movie (which is an embed tag DOM object) do not stick.
    [code]
    receiveEvent: function(eventName, args) {
    // receive event from flash
    eventName = eventName.toString().toLowerCase().replace(/^on/, '');

    // special behavior for certain events
    switch (eventName) {
    case 'load':
    // movie claims it is ready, but in IE this isn't always the case...
    // bug fix: Cannot extend EMBED DOM elements in Firefox, must use traditional function
    this.movie = document.getElementById(this.movieId);
    if (!this.movie) {
    var self = this;
    setTimeout( function() { self.receiveEvent('load', null); }, 1 );
    return;
    }

    // firefox on pc needs a "kick" in order to set these in certain cases
    if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) {
    var self = this;
    setTimeout( function() { self.receiveEvent('load', null); }, 100 );
    this.ready = true;
    return;
    }

    this.ready = true;
    this.movie.clearText();
    this.movie.appendText( this.clipText );
    this.movie.setFileName( this.fileName );
    this.movie.setAction( this.action );
    this.movie.setCharSet( this.charSet );
    this.movie.setBomInc( this.incBom );
    this.movie.setHandCursor( this.handCursorEnabled );
    break;
    [/code]
  • compuwizard123compuwizard123 Posts: 5Questions: 0Answers: 0
    So should I post the example in the ZeroClipboard and open an issues ticket?
This discussion has been closed.