/    Sign up×
Community /Pin to ProfileBookmark

Sorting Table Columns

I have a table with 4 rows. Is it possible to give it a button on each row that will sort the data? For example, column 1 is name, column 2 is amount, column 3 is date. If the user clicks on colum 3, then the entire table is sorted by date?

Thank you.

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@chrisranjanaDec 21.2007 — Yes some custom functions can be programmed in php to do what you are asking.
Copy linkTweet thisAlerts:
@TheRaveDec 21.2007 — How is the table populated? If its populated via a database the change its very easy; It just requires an addition to the SQL statement.
Copy linkTweet thisAlerts:
@xoxLISAxoxauthorDec 21.2007 — Hello Rave, very glad to see you again.

The table is manually edited by me, nothing fancy. Just a plain table in html format.
Copy linkTweet thisAlerts:
@xoxLISAxoxauthorJan 08.2008 — Anyone care to share?
Copy linkTweet thisAlerts:
@hastxJan 08.2008 — I would use javascript then. There are a few free ones out there. Here is one :

http://www.kryogenix.org/code/browser/sorttable/
×

Success!

Help @xoxLISAxox spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...