[thelist] links in a sortable HTML table

.jeff jeff at members.evolt.org
Sun Oct 27 21:34:01 CST 2002


tim,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Tim Shortt
>
> I am trying to implement a client-side sortable table.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

unless it's meant as a learning experience, i'd recommend going with something that's already written.

http://webfx.eae.net/dhtml/tablesort/tablesort.html

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> I have managed to get number, character, and date
> content within a TBODY to sort properly when any type
> of content (text or image) in the column <TH> is
> clicked. However, if the content in the TBODY is a link
> [ <a href="#">content</a> ], I haven't found a way to
> sort this data using the content of the anchor. I would
> like the link content to sort by the value of the link,
> (e.g. the string "content" in the example above).
> Currently, the link fields sort by some other way that
> I haven't figured out.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

take a look at the innerText property and sort by those values.

your big headache hasn't shown it's head yet though -- dates.

good luck,

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/




More information about the thelist mailing list