• Resolved trilogee

    (@trilogee)


    Hi, I’m trying to create a table with a search box but it doesn’t seem to be working. I have ‘ Use the following features of the DataTables JavaScript library with this table:’ checked as well as all options beneath.

    I checked the source for the page and there is only one instance of jquery in a <script> tag. Was a little unsure of the developer tools recommendation but i deactivated every plugin I have and it still didn’t work.

    The odd thing is I tried the table on a different wp siteand it worked so I now its a problem with my site…is there any way you could take a look?

    http://pscweb.staging.wpengine.com/self-storage-auction/

    http://wordpress.org/plugins/tablepress/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Most likely, there’s a JS problem somewhere, and we should be able to find that. Another common reason for this: These features will not work in tables that use the “colspan” or “rowspan” feature to combine cells. Is that maybe the case for your table?

    Unfortunately, I couldn’t take a direct look, as the link you posted only gives me a Not found error 🙁

    Regards,
    Tobias

    Thread Starter trilogee

    (@trilogee)

    Sorry about that I just deleted the page it’s back up now!
    Is that configurable through the plugin (colspan/rowspan)

    Thread Starter trilogee

    (@trilogee)

    ps: thanks so much for your quick reply…probably the most prompt wp plugin support I’ve ever gotten!

    Thread Starter trilogee

    (@trilogee)

    and just checked. col/row not enabled. When I try to enable I get a warning either way saying its not compatible with datatables

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks, now the link is working.

    With the rowspan/colspan: Yes, there’s a warning, but I wanted to rule it out.

    Anyway, the reason for the problem should be the theme. As it seems, there’s no call to

    wp_footer();

    right before the closing HTML </body> tag in the theme’s “footer.php” file.
    Could you please check that?

    Regards,
    Tobias

    Thread Starter trilogee

    (@trilogee)

    As you can tell im a n00b when it comes to development but I did a ctrl+f on the footer.php and there’s no instance of wp_footer. If you could walk me through what I need to do that would be so greatly appreciated. Here are the lines before </body> in footer.php

    <script type=”text/javascript”>
    setTimeout(function(){var a=document.createElement(“script”);
    var b=document.getElementsByTagName(“script”)[0];
    a.src=document.location.protocol+”//dnn506yrbagrg.cloudfront.net/pages/scripts/0014/8113.js?”+Math.floor(new Date().getTime()/3600000);
    a.async=true;a.type=”text/javascript”;b.parentNode.insertBefore(a,b)}, 1);
    </script>
    </body>

    Thread Starter trilogee

    (@trilogee)

    hahah sweet! Thanks so much for pointing me in the right direction.

    added this
    <?php wp_footer(); ?>

    and it works!

    You Are AWESOME

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for finding this.
    Please perform these modifications:
    – Remove the entire portion from <script... to </script>. This is some JavaScript tracking code that should not be used (unless you put it there on purpose and know what you are doing).
    – Then, add this before the </body> tag:

    <?php wp_footer(); ?>

    Regards,
    Tobias

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    ah, great 🙂 Good to hear that you were successful, already 🙂

    Have fun with the feature and with TablePress then!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

    Thread Starter trilogee

    (@trilogee)

    I most definitely will. thanks a lot!

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! 🙂
    And thanks for the rating, I really appreciate it!

    Best wishes,
    Tobias

    Thread Starter trilogee

    (@trilogee)

    No problem! I actually have one more question for you if you don’t mind – Is there anyway to populate the search box with instructions (i.e ‘search a city, postal code or name’ etc.)

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    you could change the actual string from “Search” to something else with the TablePress Extension from http://tablepress.org/extensions/change-datatables-strings/
    With your example, it might make more sense to simply add this as text above the table though.

    Regards,
    Tobias

Viewing 13 replies - 1 through 13 (of 13 total)

The topic ‘No DataTables features (checked JS FAQ)’ is closed to new replies.