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
- Wine Tasting in Napa Valley
- How to build a Shot-Ski
- Bus Project Update
- Farewell to the 2011-2012 Ski Season
- Cruising around the Western Caribbean
- Spring Break!
- A Spectacular Trip to Stockholm and Madrid
- Comparing Web Frameworks and HTML5 with Play Scala at Jfokus 2012
- Play Framework 2.0 with Peter Hilton at Jfokus
- Secure JSON Services with Play Scala and SecureSocial
Posted by Lance on February 11, 2003 at 04:14 PM MST #
Posted by Cesar Sandoval on February 12, 2003 at 10:59 AM MST #
Posted by Tom on January 26, 2004 at 12:50 PM 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 07:21 PM MST #
Posted by Nagraj on December 13, 2005 at 03:26 AM MST #