generic code to sort tables ?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mel

    generic code to sort tables ?

    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


  • Mick White

    #2
    Re: generic code to sort tables ?

    Mel wrote:[color=blue]
    > 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
    >
    >[/color]
    There is generic code to a degree, but the sorting routine may have to
    be custom made.



    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

    Comment

    • RobB

      #3
      Re: generic code to sort tables ?

      Mel wrote:[color=blue]
      > 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[/color]
      write[color=blue]
      > one for each and every table i come up with ?
      >
      > many thanks for your input[/color]

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



      Comment

      • whiteinge@gmail.com

        #4
        Re: generic code to sort tables ?

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



        - whiteinge

        RobB wrote:[color=blue]
        > Mel wrote:[color=green]
        > > 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[/color][/color]
        to[color=blue]
        > write[color=green]
        > > one for each and every table i come up with ?
        > >
        > > many thanks for your input[/color]
        >
        > Not sure how 'generic' this is, but it comes with a nice tutorial.
        >
        > http://www.brainjar.com/dhtml/tablesort/[/color]

        Comment

        Working...