Sorting HTML Tables Using Javascript
This JavaScript code can be used to convert tables in ordinary HTML into sortable ones by associating each title column with an onClick event to automatically sort the data rows. No additional coding is necessary. All you need to do is give your table an ID field, include the sortTable.js file and call initTable in your document's onLoad method.
Visit publisher site: Sorting HTML Tables Using JavascriptListing Details
- Filed in:
-
Scripts / JavaScript / Scripts & Programs / Miscellaneous
- Submitted on:
- Last Updated:
- Publisher:
- Other listings by this publisher
License & Pricing Information
User Reviews
Add/Edit Your ReviewDisplaying 1-3 out of 3 reviews
-
This works very well for me, so far. I found it quite easy to use, and had no problem making minor modifications (color schemes for example). Very nice.
-
The author provided 3 versions, two work but are too slow (noticeably slow for tables with just 3 rows, quite slow for table with 40 rows even on powerful computers, unusable for table with a couple hundred rows). The 3rd version did not work, and I found it still quite slow after bug fixing that got it going. This version also lacks multi-table support and will not work for even slightly complicated cell content like hyperlinks. So all 3 versions are not usable for anything but small tables.
-
a good idea would be to keep the formating for
cells. See all 3 reviews for Sorting HTML Tables Using Javascript