You are here: Re: Best practices for sortable columns « PHP Programming Language « IT news, forums, messages
Re: Best practices for sortable columns

Posted by Jerry Stuckle on 02/13/06 22:21

newtophp2000@yahoo.com wrote:
> I have several forms that display information from the database after
> users log in. I would like the column titles to be sortable so that
> when the user clicks on a column heading, the data re-displays in
> sorted order of that column. Next time they click on it, it toggles
> the order from ascending to descending, and then back to ascending
> again.
>
> Since I have many forms and each form has different columns, I was
> wondering if there was a method that would be better than a brute force
> approach. What are the best practices for this functionality?
>
> Thanks!
>

Another alternative is to do the sort in JavaScript (although it won't
work for those who have JavaScript turned off). One of the sites I've
seen, http://www.utopiapimp.com (a RPG support site) does this.

To see an example, go to the Home Page and click on "Demo 1". Then click
on the "General" after "Column Sets:".

This page uses JS to do the sorting. Just click on the column headers
such as "Acres", "NW", etc. to see what happens.

A very usable UI, IMHO.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация