http://www.mattkruse.com/javascript/sorttable/#

Description: 
A common need is to have a table of results or data in the browser and to let the user sort the columns in the browser without needing to go back to the server each time.

This complex script allows that functionality using extensive DHTML.

In older browsers (<4) no sorting will happen, and in Netscape the tables may not contain form elements if you wish them to be sorted. 

Example: 


(Click on the plain text column headers to sort)

Submitted
Sel Order Num S Ref Date Serial    
43870  
1 
43870  
14Jun2000
 
43810  
1 
43810  
14Jun2000
 
43727  
1 
43727  
14Jun2000
 
43949  
1 
43949  
14Jun2000
 
43598  
02Jun2000
 
43894  
1 
43894  
14Jun2000
 
43794  
1 
43794  
12Jun2000
 
43928  
1 
43928  
14Jun2000
 
43640  
1 
43640  
14Jun2000
 

Name ID Bonus
Mary Doe
111
$765.43
John Doe
12345
$500.00
James Baker
555
$0.99