walterbyrd said:
Thank you, that is great to know. What if there were 1000 records, and
the table was paginated? I suppose, ajax would sort the front end, and
backend language, and database, would soft behind the scene, or
something?
Im not an AJAX expert (not even close actually. In fact i just used it
once), but seems like you will have to reload all the page (all the
table at least). Because now is a different scenario. If the table is
paginated, it looks like you will send, say 50 results at one time, then
(when pressing 'next 50'), anhoter 50, and so on. So AJAX only will
have THOSE 50 for ordering. Another approach would be returning de
entire recordset, and implement all the 'next' and 'previous' links via
AJAX. And i dont think you will like to send the entire result. I dont.
What will i do (at least from WIK for now), is having a set of `hrefs'
(maybe with some nice arrows) in all of the table headers, to indicate
the desired order you want to get. And, if you have a column table named
'age', you will make those href like
'<a
href=showmethetable.py?columnorder=age&ordertype=asc><nice_arrow_graphic>'
then your cgi python script will take that mess after the ? sign, parse
it (via cgi module perhaps), and make a new query, with the 'order by
age asc' clause, wich are the 'arguments' in the url.
There is allways a lot of ways to do some stuff. I will check into de
AJAX list too!
Cheers.
Gerardo