• Resolved Peter

    (@peterx3x)


    Hi, Tobias
    Right now I am trying to optimize my website for the different browsers (the most hated part of all work :)).
    I see some strange behaviour of the paginated tables in IE8:
    https://test.marketing-forge.com/?page_id=30
    https://test.marketing-forge.com/?page_id=25
    There is a lot of white space after the table (as if the browser extends the page to show all rows, but the table is configured to show 10).
    If I enter compatibility mode, the page is correctly rendered, but the design screws up. So it may be something with the way IE8 handles the pagination of tables.
    The problem doesn’t occur in Firefox, Opera, Chrome or Safari.
    I will appreciate any help on this last stage of my site’s development.
    Regards,
    Peter

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    I just checked your site and I can confirm the problem.

    Unfortunately I don’t have an idea on what might be causing this.

    I suggest that you try the following:
    – Fix the HTML validation of your site (see https://validator.w3.org which shows that there are a few problems in your page’s HTML code).
    – Then try to use “Internet Explorer Developer Toolbar” to check if there’s something wrong with the CSS.
    – If all of that does not help, you could try asking in the DataTables forums at https://www.datatables.net, where the creator of the JavaScript library that does the pagination might be able to help.

    Best wishes,
    Tobias

    Thread Starter Peter

    (@peterx3x)

    Hi,
    I’ve tried different approaches but nothing helps.
    For now I fixed the height to 900 px, so the problem still persists but is not so obvious.
    Alternative solution is not to use pagination for the tables in IE.
    Since I use browser detection script to change the css, I can do this.
    My question is how to asign the needed value (may be “false”) to the apropriate variable?
    I see your code for it here:
    <input type="checkbox" name="table[options][datatables_paginate]" id="table_options_datatables_paginate"<?php echo ( $table['options']['datatables_paginate'] ) ? ' checked="checked"': '' ; ?><?php echo ( !$datatables_enabled || !$table['options']['use_tablesorter'] || !$table['options']['first_row_th'] ) ? ' disabled="disabled"': '' ; ?> value="true" /> <label for="table_options_datatables_paginate">
    But how to use it in my header.php ?

    Thread Starter Peter

    (@peterx3x)

    Hi,
    I’ve tried different approaches but nothing helps.
    For now I fixed the height to 900 px, so the problem still persists but is not so obvious.
    Alternative solution is not to use pagination for the tables in IE.
    Since I use browser detection script to change the css, I can do this.
    My question is how to asign the needed value (may be “false”) to the apropriate variable?
    I see your code for it here:
    <input type="checkbox" name="table[options][datatables_paginate]" id="table_options_datatables_paginate"<?php echo ( $table['options']['datatables_paginate'] ) ? ' checked="checked"': '' ; ?><?php echo ( !$datatables_enabled || !$table['options']['use_tablesorter'] || !$table['options']['first_row_th'] ) ? ' disabled="disabled"': '' ; ?> value="true" /> <label for="table_options_datatables_paginate">
    But how to use it in my header.php ?

    Thread Starter Peter

    (@peterx3x)

    Hi,
    I’ve tried different approaches but nothing helps.
    For now I fixed the height to 900 px, so the problem still persists but is not so obvious.
    Alternative solution is not to use pagination for the tables in IE.
    Since I use browser detection script to change the css, I can do this.
    My question is how to asign the needed value (may be “false”) to the apropriate variable?
    I see your code for it here:

    <input type=”checkbox” name=”table[options][datatables_paginate]” id=”table_options_datatables_paginate”<?php echo ( $table[‘options’][‘datatables_paginate’] ) ? ‘ checked=”checked”‘: ” ; ?><?php echo ( !$datatables_enabled || !$table[‘options’][‘use_tablesorter’] || !$table[‘options’][‘first_row_th’] ) ? ‘ disabled=”disabled”‘: ” ; ?> value=”true” /> <label for=”table_options_datatables_paginate”>

    But how to use it in my header.php ?

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    you should not have to need to modify that code.
    Instead, as you already have a browser detection, change the Shortcode accordingly.

    If you detect an IE8, just add the datatables_paginate=false parameter for the Shortcode.

    To achieve that, you will however need PHP in WordPress posts. Then, wrap the Shortcode in a do_shortcode() call.

    Alternatively, and actually more easily, you could use the Template Tag function wp_table_reloaded_print_table() with either the parameter added or not.

    Best wishes,
    Tobias

    Thread Starter Peter

    (@peterx3x)

    Thanks ??
    The code

    <exec>
    $ua = browser_info();
    if ($ua['msie']) echo do_shortcode('[table id=2 datatables_paginate=false /]'); else echo do_shortcode('[table id=2 /]');
    </exec>

    is simple enough for me and does the trick!
    Thank you very much!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    yes, that’s exactly what I meant ??
    Very nice!

    Best wishes,
    Tobias

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: WP-Table Reloaded] Empty space after paginated table in IE8’ is closed to new replies.