|
Subject: Need a way to hide children with certain attributes. From: "Kara Lee" <karal@xxxxxxxxxxxxxx> Date: Wed, 28 Jul 1999 13:05:48 -0700 |
Is there a way to hide children with a certain attribute but display all
others. I need this functionality not when I create the page, but in an
onclick event. I using a script to do it now, but I don't know how to make
the script read attributes from the XML tags.
XML:
<Authors>
<Author Onclick="show">Smith J</Author>
<Author Onclick="hide">Doe J</Author>
</Authors>
Currently the stylesheet formats it like this:
- Authors
Smith J
Doe J
Script for an onclick event:
e = window.event.srcElement;
// find the +/- symbol
mark = e.children(0);
// if it is already collapsed, expand it by showing the
children
if (mark.innerText == "+")
{
mark.innerText = "-";
for (var i = 1; i < e.children.length; i++)
{
e.children(i).style.display = "";
}
}
// if it is expanded, collapse it by hiding the children
else if (mark.innerText == "-")
{
mark.innerText = "+";
for (var i = 1; i < e.children.length; i++)
{
e.children(i).style.display="none";
}
}
I want the format to look like this:
- Authors
Smith J
Doe J
Then Onclick to look like this:
- Authors
Smith J
It may not be possible, but any suggestions would be greatly appreciated.
Thanks in advance.
--------------------------------------
Kara Lee
Applied Technical Systems
karal@xxxxxxxxxxxxxx
http://www.apptechsys.com
CCM Technology Demo:
http://www.apptechsys.com/ccm
---------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: Includes through XSL, Sebastian Rahtz | Thread | setting TopLevel variables external, Jon Smirl |
| Re: XSL opportunities, Chuck White | Date | setting TopLevel variables external, Jon Smirl |
| Month |