Datatables and Perl (and a little bit of jQuery)

Recently I’ve stumbled on a pretty cool OpenSource project called ”datatables” (http://datatables.net/), which allows to easily create tables in HTML that can be:

  • sorted
  • searched
  • paginated
  • scroll infinitely
  • themed

And most important: it’s for free! I’ve always wanted to create an infinite scrolling table and now it’s just too easy:

And that’s it! Well, ok, you need to include the Javascript file and CSS files of the Datatables Project of course and you need to create the table in HTML.

For instance:

And then you will need a Perl script providing you the data for the table.
The below example allows to

  • search the tables
  • scroll infinitely
  • sort on the columns

It also supplies the Datatables table with a total amount or rows in the database table.

This following script will be saved as ”get_ip_data.pl”

An example can be found overhere: http://www.moretrix.com/~insaniac/map/map.pl

flattr this!


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">