cgi sorting table

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

    #1

    cgi sorting table

    Hi guys,

    I'm using Python to generate a cgi web page with a table. What I
    want to do is able to sort the table when the user clicks on a table
    header. I'm trying to avoid using DOM and instead just want to use python
    to generate a new page. Any ideas?

    Thanks
  • Cliff Wells

    #2
    Re: cgi sorting table

    On Mon, 2004-09-13 at 05:55 +0000, someguy wrote:[color=blue]
    > Hi guys,
    >
    > I'm using Python to generate a cgi web page with a table. What I
    > want to do is able to sort the table when the user clicks on a table
    > header. I'm trying to avoid using DOM and instead just want to use python
    > to generate a new page. Any ideas?[/color]

    Just have the table header be a link that POSTs back to your cgi script
    with the index of the column. You don't give a lot of information here,
    but I'm guessing your table is generated from a Python list, so just use
    the list's sort() method, then redisplay the page.

    Regards,
    Cliff

    --
    Cliff Wells <clifford.wells @comcast.net>

    Comment

    Working...