Re: Is it possible to sort a collection of XML childNodes?
- From: RobG <rgqld@xxxxxxxxxxxx>
- Date: Wed, 17 Aug 2005 23:36:22 GMT
bissatch@xxxxxxxxxxx wrote:
Hi,
I am about to create a table, where the values are taken from an XML file, where each column header you can click and it will sort the table rows at the client side.
Typically records are sorted at the server when they are extracted from the database so that they have some default (or maybe user defined) order when first presented. Once you've created HTML from them, the browser script does the sorting thereafter. You may have a cookie that remembers the current sort column and uses it the next time the site is visited.
There are a number of JavaScript-based table sort routines available, some allow sorting of the table at the client when it is first loaded.
There are other techniques using XSL but last time I tried that (some time ago) it was very browser-specific and slow. Things may have improved but I think XSL/T has either moved to the server or been largely ignored.
[...]
Reasonable table sort routine on Matt Kruze's site:
<URL:http://www.mattkruse.com/javascript/sorttable/>
Recent thread discussing table sort:
<URL:http://groups-beta.google.com/group/comp.lang.javascript/tree/browse_frm/thread/d2e13db951e3db77/b3fdc2615655cf3d?rnum=1&hl=en&q=sort+table&_done=%2Fgroup%2Fcomp.lang.javascript%2Fbrowse_frm%2Fthread%2Fd2e13db951e3db77%2F757b0bb0092a4b7d%3Fq%3Dsort+table%26rnum%3D2%26hl%3Den%26#doc_b3fdc2615655cf3d>
-- Rob .
- Follow-Ups:
- Re: Is it possible to sort a collection of XML childNodes?
- From: Matt Kruse
- Re: Is it possible to sort a collection of XML childNodes?
- References:
- Is it possible to sort a collection of XML childNodes?
- From: bissatch
- Is it possible to sort a collection of XML childNodes?
- Prev by Date: Re: innerHTML giving me some bother
- Next by Date: Re: innerHTML giving me some bother
- Previous by thread: Re: Is it possible to sort a collection of XML childNodes?
- Next by thread: Re: Is it possible to sort a collection of XML childNodes?
- Index(es):
Relevant Pages
|