[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Show - hide with xslt?

Subject: RE: Show - hide with xslt?
From: "Bjorn Boxstart" <bboxstart@xxxxxxxxxxxxx>
Date: Thu, 24 Aug 2000 13:45:44 +0200
xslt show hide
Your text ("click here to show") must somehow be connected to the
information that is being displayed or hidden. You can do this by using the
generateid() function in your xslt stylesheet, so that the following will be
the result:

<a href="javascript:showhide('<generated id>');">[click here to show /
hide]</a>
<div id="<generated id>" style="display:none">
	<p>Blablalblbblbxkblkblk
blxkblkblkalkalbka
xkblalblblalbkalk
blkxlbkalkblakb</p>
</div>

your show / hide function should look like the following

<script language="javaScript">
<!-- // disable for old browsers
function showhide(id) {
	if(document.all.item(id).style.display == "none") {
		// show block
		document.all.item(id).style.display = "";
	} else
		// already shown, so hide
		document.all.item(id).style.display = "none";
}

-->
</script>

I haven't tested it, so I don't know whether the syntax is really correct,
but the principle should work.

bye,

Bjorn

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Andrea Penna
Sent: Thursday, August 24, 2000 12:48 PM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Show - hide with xslt?


May be this is a faq (if it's so please point me at the right place...;-)

I want to show or hide on output, with ie5 msxml3 client-side only, a piece
of my xml doc with a click on a link in the same doc.

This is easy with javascript in html and also in xml if I have only one item
but with two or more indipendently it doesn't work.

What I want is:

"Before click"
Click here to show it

"After click"
Blablalblbblbxkblkblk
blxkblkblkalkalbka
xkblalblblalbkalk
blkxlbkalkblakb
Click here to hide it

Some one used it before?

Thank you, Andrea


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


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.