Sorting a table on a page

Home » Forums » Visual Site Designer » Sorting a table on a page


Registered User
33 posts

The following page has three columns on the right side:

http://www.chisagocountyhistory.org/tes … eries.html

I would like to add "Sort" buttons at the top of the columns that when clicked would resort the table.

My initial thought is to create jpg overlays that would be painted into this area, depending on which button was clicked. But I think the hyperlinks in the first column are a problem in that method. My next thought was to create 3 identical pages but with a different sort on each page, then call the appropriate page when clicking a button.

Is there a better way? What method(s) would you suggest to accomplish this?


Senior Advisor
9,112 posts
Online Now

There's a lot of ways to do this but I think this would be the easiest.:)
http://progrower.coffeecup.com/iframeswitch.html I can't hear what I'm looking at.
It's so easy to overlook something your not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/





Registered User
33 posts

Okay, great! I understand how that will work. I did forge ahead with swapping full pages. I will give the "Frames" concept a try next. I have some other pages where I can use this concept as well.

Thank you for the prompt response and the link to your examples!


Senior Advisor
9,112 posts
Online Now

The iframe gives a lot of flexibility because you can easily edit the single pages.
But here's some more options.:)
I also found this great example of actually using tables, what they were meant for.
http://www.kryogenix.org/code/browser/sorttable/

I also have this javascript example for showing and hiding data.
http://progrower.coffeecup.com/showhide.html I can't hear what I'm looking at.
It's so easy to overlook something your not looking for.

Here's my S-Drive site with
examples of what can be accomplished in VSD.
http://progrower.coffeecup.com/
Here's my CoffeeCup SCCP Shop with examples of what can be done.
http://progrower.coffeecup.com/shop/





Ambassador
1,481 posts

Thanks for that link Eric. I will definitely add that to my box of tricks. You are no slouch either with the code you portray. The Guy from OZ
Prism
A many faceted individual


Senior Advisor
9,161 posts

Try googling for some scripts for this too, there are definitely some out there that you can use for sorting columns. Not sure if it works for tables or not, but I know I've found some over the years. Jo Ann

http://lbwebsites.com - Affordable Web Design & Hosting
http://cattownrescue.org ... Love this site! Love cats! This site was definitely fun to do :)
http://northbaldwinliteracycouncil.org .... Our local Literacy Council



Ambassador
1,481 posts

You are right Jo I looked at some Javascript that will add, average and do any math on values if set up correctly. Do what Jo has advised you will find a function to do what you want The Guy from OZ
Prism
A many faceted individual

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.