Hi,
I'm using the following javascript function to expand and collapse portions
of text in a web page (targeted at IE5.5 and above):
function doExpand(paraNu m,arrowNum) {
if (paraNum.style. display=="none" ) {
paraNum.style.d isplay="";
arrowNum.src="c ollapse.gif";
}
else {
paraNum.style.d isplay="none";
arrowNum.src="e xpand.gif";
}
}
Implemented as follows:
<p><a href="JavaScrip t:doExpand(exp1 ,ar1)"><img src="expand.gif " id="ar1"
border="0" width="9" height="9"></a>
Title Text</p>
<div id="exp1" style="display: none" onclick="doExpa nd(exp1,ar1)">
<p>Drop down text here</p>
</div>
And repeated when required in the same page after changing the paraNum and
arrowNum parameters.
Does anyone know how I could adapt the script to enable more than one set of
DIVs to be expanded at the same time... i.e.: with a link that says "Show
All" and when clicked, all collapsed text on the page is then exapnded...?
Thanks in advance for any clues...
James Hurrell
--
..