This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [XSLT] Hyperlink Sort by Heading


On Tue, Mar 05, 2002 at 09:29:06PM -0800, Ragan, Mitch wrote:
> Is there any way to have a column Heading in an XSLT, when clicked on with
> the mouse,  sort that column of data 
> then reverse the sort when click on again?

Not in pure XSLT -- the language doesn't have any provision for 
GUI event handling. If you have the luxury of developing for an
exclusively IE 5.0+ environment (like some corporate intranets, I
suppose), you can use Microsoft's data island trick in combination
with XSLT and just a little JavaScript.

You could also theoretically do something in JavaScript. But having
tried this myself, with partial success, I can tell you it ain't 
pretty. It takes a lot of JavaScript, and you will spend a lot of
time making it work cross-browser, and a lot of time chasing down
bugs.

If you insist on going this route, someone asked a similar question
on the list ... hmm ... about a week ago. I also have some code
filed away somewhere (not immediately handy, though) that might
help.

But I'd suggest you resign yourself to making round trips to the
server. Your supervisor might not like it, but you could be home
in time for dinner.
-- 
Matt Gushee
Englewood, Colorado, USA
mgushee@havenrock.com
http://www.havenrock.com/

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]