[thelist] Dynamically switching TR order?

Diane Soini dianesoini at earthlink.net
Sun Jul 4 15:57:00 CDT 2004


On Sunday, July 4, 2004, at 04:01 AM, thelist-request at lists.evolt.org 
wrote:
>
> What I really would like to do is dynamically move table rows up and 
> down, so that say for example I had this:
>
> <table>
> <tr><td>Row 1</td></tr>
> <tr><td>Row 2</td></tr>
> </table>
>
> Then I could somehow have a JS function which would switch the rows 
> when the user clicked a button, so that it would be displayed as if 
> the code was:
>
> <table>
> <tr><td>Row 2</td></tr>
> <tr><td>Row 1</td></tr>
> </table>
>
> Any ideas on how to solve this, or do it another way? By "do it 
> another way", I mean, does anyone have another UI solution to the 
> problem of how to let users change the order of something in a 
> top-down fashion?

I know you didn't want to sort alphabetically, but perhaps this table 
sorting javascript has some code or principle that would be of use to 
you:

http://www.kryogenix.org/code/browser/sorttable/
>
> Thanks!
>
> Jason
***
Don't be afraid to try something new. An amateur built the ark. 
Professionals built the Titanic. -unknown



More information about the thelist mailing list