generic code to sort tables ?

Discussion in 'Javascript' started by Mel, Feb 16, 2005.

  1. Mel

    Mel Guest

    i need to sort my table based on a "header click".

    is there a generic code out there that does that for me, or i have to write
    one for each and every table i come up with ?

    many thanks for your input
    Mel, Feb 16, 2005
    #1
    1. Advertising

  2. Mel

    Mick White Guest

    Mel wrote:
    > i need to sort my table based on a "header click".
    >
    > is there a generic code out there that does that for me, or i have to write
    > one for each and every table i come up with ?
    >
    > many thanks for your input
    >
    >

    There is generic code to a degree, but the sorting routine may have to
    be custom made.

    http://www.mickweb.com/football/aleague/profiles.html

    The sort table function receives a sort function as an argument.

    See if this is what you're after and, if so, I'd be happy to help you.

    Mick
    Mick White, Feb 16, 2005
    #2
    1. Advertising

  3. Mel

    RobB Guest

    Mel wrote:
    > i need to sort my table based on a "header click".
    >
    > is there a generic code out there that does that for me, or i have to

    write
    > one for each and every table i come up with ?
    >
    > many thanks for your input


    Not sure how 'generic' this is, but it comes with a nice tutorial.

    http://www.brainjar.com/dhtml/tablesort/
    RobB, Feb 16, 2005
    #3
  4. Mel

    Guest

    Also not sure about 'generic' but here's another link with a nice
    description and it's unobtrusive javascript to boot!

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

    - whiteinge

    RobB wrote:
    > Mel wrote:
    > > i need to sort my table based on a "header click".
    > >
    > > is there a generic code out there that does that for me, or i have

    to
    > write
    > > one for each and every table i come up with ?
    > >
    > > many thanks for your input

    >
    > Not sure how 'generic' this is, but it comes with a nice tutorial.
    >
    > http://www.brainjar.com/dhtml/tablesort/
    , Feb 17, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Murat Tasan
    Replies:
    1
    Views:
    8,040
    Chaitanya
    Feb 3, 2009
  2. Replies:
    2
    Views:
    434
  3. Kamilche

    CODE: Generic Sort Routine

    Kamilche, Aug 19, 2004, in forum: Python
    Replies:
    1
    Views:
    295
    Andrew Henshaw
    Aug 23, 2004
  4. minlearn
    Replies:
    2
    Views:
    454
    red floyd
    Mar 13, 2009
  5. Navin
    Replies:
    1
    Views:
    690
    Ken Schaefer
    Sep 9, 2003
Loading...

Share This Page