Firefox Doesn't Load Button in Cell on Second Page and Beyond

Firefox Doesn't Load Button in Cell on Second Page and Beyond

boysRusboysRus Posts: 5Questions: 0Answers: 0
edited December 2011 in Plug-ins
I installed the Wordpress Plug-in wp-tables reloaded which is based on these DataTables. I am trying to use the table to organize mp3 files and I have a play button for each row. The table loads the play buttons on the first page but it does not load the button for any other pages or if you expand the table beyond what is displayed on page load.

This only happens with Firefox and older versions of IE. It works fine on IE9, Safari and Chrome. I have search through various sites and haven't come up with a cause for this.

Replies

  • allanallan Posts: 63,680Questions: 1Answers: 10,498 Site admin
    There there some Javascript inserting or drawing the button? If so, you either need to run it before you initialise the table, or do it on fnDrawCallback .

    Allan
  • boysRusboysRus Posts: 5Questions: 0Answers: 0
    Thanks for the response. Here is the page that it is happening on.

    http://174.121.227.2/~missionf/media/bible-teachings/

    I am just starting to dive into Javascript so it isn't my greatest strength at this point. If you view this page with Firefox you can see the play buttons on page 1 but not on page 2. Would fnDrawCallback work to load these buttons?

    The play buttons are added by adding [wpaudio url="http://www.url.com/file.mp3" text="|" dl="0"] or by adding class="wpaudio" to the links such as Artist - Song
  • boysRusboysRus Posts: 5Questions: 0Answers: 0
    $(document).ready( function() {
    $('#example').dataTable( {
    "fnDrawCallback": function( oSettings ) {
    alert( 'DataTables has redrawn the table' );
    }
    } );
    } )

    Does this go directly in the jquery.datatables.min.js file? Do I need to replace anything other than the #example with the ID of what I am trying to load?
  • boysRusboysRus Posts: 5Questions: 0Answers: 0
    [code]
    _wpaudio.enc['wpaudio-4eec270e6ee06'] = '\u0068\u0074\u0074\u0070\...




    [/code]

    Only on Firefox, the first page, the MP3 Player creates a button with the above code and loads the play button with it.

    On the second page it looks like this

    [code]
    _wpaudio.enc['wpaudio-4eec270e6cfc7'] = '\u0068\u0074\u0074\...

    |
    [/code]

    The wpaudio-container class is missing along with the
  • boysRusboysRus Posts: 5Questions: 0Answers: 0
    I am stilling having issues with this on Firefox and cannot get the play buttons to load on any pages other than the first page.
  • allanallan Posts: 63,680Questions: 1Answers: 10,498 Site admin
    You are using client-side DOM processing - so I would suggest simply initialising the audio buttons before your initialise the DataTable: http://datatables.net/release-datatables/examples/advanced_init/events_pre_init.html . The alternative is to use fnDrawCallback or fnCreatedRow - but the pre-init would probably be best here.

    Allan
This discussion has been closed.