I want to create a static HTML file I can email to someone with a lot of data, and have that data sortable and filterable. What is the easiest to use library or package I can use to get this off the ground?

  • If it's static (an "off-line" page), I'm not sure you'll be looking at AJAX, since AJAX is usually used to communicate with servers. Commented Jan 17, 2012 at 15:09
  • I am amazed that With all the technology that keep popping every hour, your simple requirement can't be fulfilled! Consider using ZOHO or Google Docs instead.
    – NoChance
    Commented Jan 17, 2012 at 16:39
  • This needs to be static, I'm just going to roll my own.
    – sooprise
    Commented Jan 17, 2012 at 16:55
  • What's wrong with a good old fashioned spreadsheet file?
    – Shauna
    Commented Jan 17, 2012 at 18:44

4 Answers 4


You can't. You need one of three things to change HTML structure semantically

  • JavaScript, event handlers and dom manipulation
  • Forms, servers and postbacks to change the page and send a new one
  • CSS hackery, things like remodelling the CSS based on the :active state or manipulate checkboxes :checked state.

In theory it's possible to implement this with HTML and CSS alone but that's going to a be a nightmare.

Why don't you just add a link to a google document with a sortable table in it, in your email.

Of course using JavaScript to implement a sortable table isn't hard.

table.addEventListener("click", function (ev) {
  if (ev.target.tagName === "th") {

form.addEventListener("change", function (ev) {

Just implement sortTable and applyFilters


Check this one at Matt Kruse's Javascript Toolbox.

Also you can find DHX DHTMLX very useful.

  • 1
    Be warned that "generic filterable/sortable table" structures copy pasted from the internet are high fragile and likely to be full of unmaintainable spaghetti code. If it breaks your out of luck
    – Raynos
    Commented Jan 17, 2012 at 15:22
  • @Raynos, good call, I'm going to roll my own, this actually isn't that hard... :)
    – sooprise
    Commented Jan 17, 2012 at 16:56
  • Certainly it is as you say but the question here was "What is the easiest to use library or package I can use to get this off the ground". So was the answer. Commented Jan 18, 2012 at 13:18

Use XML not HTML, XML is meant to hold data, HTML is meant to create a webpage. Using XML also allows you to use XSLT to manipulate the stored data. Though depending on your definition of large amount of data it may be best to allow access to a database with the information, or import the information to database on their end.


You Can achieve this easily by using the following,
   HTML & CSS - Presentation,
   Java Script / jQuery - Logic,
   XML - You Raw Data,
Since you have asked for the open sources, so i would suggest you this one Click Here Which has documentation and source for both filter and sort functionality.

Happy coding,

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.