JavaScript Sortable Table


It is sometimes desirable to sort HTML tables, but HTML does not provide a means to do that. SortableTable is a JavaScript class that allows HTML tables to be sorted based on column number and data type. Additionally, it provides a means to allow users to sort the data live.


SortableTable was tested on Netscape 7.2, IE 6.0, and Firefox 1.0.1. It may work with other browsers but those are the only ones on which it was tested.

Tables to be sorted must have an id attribute, as in

<table id="NLstandings">


Note that these files will open in a new window. They are also included in the download.



The API is included in SortableTable.js. See the examples for usage.


Please note that this software was written to fulfill a certain requirement; I am merely making it publicly available under the GNU GPL. Consequently, there is no support offered; please do not contact me with problems and expect fixes. If you use it and like it, it would be nice if you let me know. If you would like to have it modified, I'll do that for a fee.

Click here to download: SortableTable-10.tar.gz

SortableTable-10.tar.gz Contents

Installation Instructions

There is no real installation, though you may want to unzip the contents into an empty directory. Just download the file and unzip it with:

$ tar -xzf SortableTable-10.tar.gz

Windows users should be able to use WinZIP or something similar.