[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
www.dhtmlgoodies.com • View topic - Unobtrusive sortable table script
Advertisement

Unobtrusive sortable table script

Moderators: Calcifer, slothy

Unobtrusive sortable table script

Postby scialom » Thu Oct 19, 2006 5:45 pm

scialom
 
Posts: 39
Joined: Tue Feb 28, 2006 4:47 pm

Postby Batalf » Thu Oct 19, 2006 8:50 pm

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby scialom » Fri Oct 20, 2006 10:06 am

Thanks that is a neat solution :)
scialom
 
Posts: 39
Joined: Tue Feb 28, 2006 4:47 pm

Postby slothy » Fri Oct 20, 2006 12:41 pm

Alf's solution is, naturally, excellent :)

A solution that i used for a similar problem involved using reg expressions to change td to a date type, storing to array, then sorting on that newly-defined array.

The reason why i adopted this approach was that i did not anticipate users wanting to order on this column often enough to justify having an extra span in the HTML.

Of course meant another chunky JS function :) but when i had a table 250 rows long didnt matter :)

Both are good depends 1) how comfortable you are with reg exp and JS and 2) what trade-off you expect or desire (ie more HTML or more code)

Alex
slothy
Moderator
 
Posts: 58
Joined: Fri Aug 25, 2006 1:42 pm


Return to Table script questions

Who is online

Users browsing this forum: No registered users and 3 guests

cron