So I have a database with 50 or so lenses and their attributes. I have a simple php script to let the user enter in min and max values from none/some/all of the attributes and then display a table with the corresponding lenses. What I'd like to be able to do is after the lenses are displayed is to have the legend clickable to sort the lenses and their attributes. I've done a bit of searching but can't find anything implemented easily.
2 Answers
Given the small number of results you want to re-sort, you can certainly do that in the web browser rather than making a round-trip back to the server.
If you can use jQuery, there are a number of grid controls that allow for sorting in the web browser, e.g.:
Search for jquery grid sortable to find many other options.
1 Comment
Austin Munro
Thanks, tablesorter worked automatically with one of my lens databases but I'm throwing some errors on another one that I am having to look into. But yeah, tablesorter is working great!
This jQuery plugin has built in AJAX functionality that could be useful in your case:
2 Comments
Eric J.
Why use Ajax to make a round-trip to the web server with so few results?
Jordan Speizer
True - tablesorter would probably make the most sense here. Just thought I'd provide an alternative considering the op had trouble finding easy to implement solutions.