cgi sorting table

S

someguy

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
 
C

Cliff Wells

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?

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,206
Messages
2,571,069
Members
47,675
Latest member
RollandKna

Latest Threads

Top