Tuesday February 11, 2003
Client-side Sorting with the DOM
I'm amazed at how easy it is to sort an HTML table with the DOM and JavaScript. I whipped up a quick modification of Porter's Sort Table Rows demo. The basic enhancements I
made where removing the <a>'s from the table headers, and just adding an onclick
handler to the <th>'s. I also added indicators to display the the current
column/direction that's sorted. Seems to work in most of the browsers too! On Windows
2000, this includes IE6, IE5.5, Opera 7 and Phoenix 0.5. On OS X, the latest versions of
Safari, Chimera, IE, Mozilla and Netscape. It doesn't work on OmniWeb, and the
cursor: pointer doesn't work on the <th>'s in IE/Mac and IE5.5/Win.
Anyway, you can checkout the
demo or download with
the relevant HTML, .gif and .js files. I've also included it below for your convenience.
I'd love to add this sort of capability to the display tag library. Posted in The Web at Feb 11 2003, 12:54:38 PM MST 8 Comments
Search This Site
Recent Entries
- What's Next
- Jack's Mohawk
- LinkedIn Cuts 10% (a.k.a. The Journey is Over)
- Happy Birthday Abbie!
- Moving from Spring's XML to Annotations in AppFuse
- Free Maven Training in New Orleans on Election Day
- AppFuse Light ยป AppFuse, Maven Archetypes and Shared Web Assets
- Great Weekend in Montana
- Colorado Software Summit 2008 Wrapup
- RESTful Web Applications with Subbu Allamaraju
Posted by Lance on February 11, 2003 at 03:14 PM MST #
Posted by Cesar Sandoval on February 12, 2003 at 09:59 AM MST #
Posted by Tom on January 26, 2004 at 11:50 AM MST #
Posted by Gary Burke on May 10, 2004 at 08:42 AM MDT #
Posted by kleineikenscheidt/stefan on September 16, 2004 at 12:50 PM MDT #
Posted by Roman on June 29, 2005 at 11:08 AM MDT #
Posted by Robert C. Morreale on December 01, 2005 at 06:21 PM MST #
Posted by Nagraj on December 13, 2005 at 02:26 AM MST #