JavaScript
JavaScript Contents
Summary This snippet demonstrates how to use behaviors to Sort a table by clicking on the column header. It also uses behaviors to highlight the row when moving the mouse over it.
View This Snippet in Action
This snippet demonstrates adding the following two functionalities to an Databound HTML table:a) Allowing the user to sort the table in ascending/descending order when the column header is clicked.b) Highlighting the current row when the user mouses over it as well as highlighting the selected row when the user clicks on it.Well, the concept has been done before by Trace and many of the other talented folks in this group. However, this particular implementation involves behaviors. Using behaviors, the snippet demonstrates how to add this functionality without having to add alot of javascript/vbscript code each time around. Simply add the behavior to your table and the functionality comes along with it. Since I have to add this type of functionality to just about every single HTML table that I create in a web application, this saves tons of time. You can also check it out in action at XMLPitstop -
Changes on 02/16/2002:
Partners
Dream.In.Code dotNet Slackers dotNet Spider Your HTML Source VisualBuilder.com DevGuru Planet Source Code ZVON.ORG Web Design ASPAlliance XML Pitstop Scripts
The Spot 4 SAP Bitshop Web Hosting