Sorting HTML Tables, kind of like what Yahoo uses

Results 1 to 2 of 2

Thread: Sorting HTML Tables, kind of like what Yahoo uses

  1. #1
    Mustafa Mohamed Guest

    Default Sorting HTML Tables, kind of like what Yahoo uses

    Hi all. I don&#039;t mean to use Yahoo! as an example, but they have a good example of what I am trying to achieve. What I am doing is pulling data from a DB and putting this data into an HTML form. What I would like to do is to sort this table based on the table headings. i.e. I have a table with headings for Name, e-mail address, Registration Date, etc.. By default I pull the data from the database where it has sorted on Name. Now I would like to view this same data after sorting on "E-mail Address" Any ideas on how I can go about doing this with ASP? <BR><BR>Mustafa

  2. #2
    Join Date
    Dec 1969

    Default Via server-side or client-side code?

    Server side is easy: You just send the page back to itself but with a form field that says "ORDER BY Email" and then you tack that form field value onto the query in place of the "ORDER BY Name".<BR><BR>A lot of people do it with hyperlinks:<BR><BR>&#060;A HREF="thisSamePage.asp?orderby=EMail"&#062;EMail&# 060;/A&#062;<BR><BR>**BUT** If you&#039;d like to take some of the load off of your server, and do it all in the browser... Then take a look at my example at -- search for the link there that mentions "client side sorting".<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts