Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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?

share|improve this question
    
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. –  FrustratedWithFormsDesigner Jan 17 '12 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. –  Emmad Kareem Jan 17 '12 at 16:39
    
This needs to be static, I'm just going to roll my own. –  sooprise Jan 17 '12 at 16:55
    
What's wrong with a good old fashioned spreadsheet file? –  Shauna Jan 17 '12 at 18:44
add comment

4 Answers 4

up vote 4 down vote accepted

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") {
    sortTable(ev.target);
  }
});

form.addEventListener("change", function (ev) {
  applyFilters(ev);
});

Just implement sortTable and applyFilters

share|improve this answer
add comment

Check this one at Matt Kruse's Javascript Toolbox.

Also you can find DHX DHTMLX very useful.

share|improve this answer
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 Jan 17 '12 at 15:22
    
@Raynos, good call, I'm going to roll my own, this actually isn't that hard... :) –  sooprise Jan 17 '12 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. –  Expressions Jan 18 '12 at 13:18
add comment

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.

share|improve this answer
add comment

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,
Cheers,
Arun

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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