|
Subject: RE: Show - hide with xslt? From: "Bjorn Boxstart" <bboxstart@xxxxxxxxxxxxx> Date: Thu, 24 Aug 2000 13:45:44 +0200 |
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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Show - hide with xslt?, Andrea Penna | Thread | Re: Show - hide with xslt?, Andrea Penna |
| Re: parse malformed XML element, Wendell Piez | Date | RE: Show - hide with xslt?, Chris Bayes |
| Month |