Hi All!
Not sure if anyone would want to take a crack at this or not...But here's what I've got: It's a small script for creating a menu tree. It works great but I want to modify it so that you can only have one section of the tree open at a time. In other words, when you open a second portion of the tree, it should close the last section that was opened. Not sure how complex this would be but any feedback would be awesome! Thanks
******************
Script in the head section
******************
<script language="javascript">
<!--
var Open = "";
var Closed = "";
function preload(){
if(document.images){
Open = new Image(16,13);
Closed = new Image(16,13);
Open.src = "open.jpg";
Closed.src = "closed.jpg";
}}
function showhide (what) {
if (document.getElementById(what + "outline").style.display=="none"){
document.getElementById(what + "sign").src=Open.src;
document.getElementById(what + "outline").style.display="";
}
else {
document.getElementById(what + "sign").src=Closed.src;
document.getElementById(what + "outline").style.display="none";
}
}
document.onload=preload();
-->
</script>
****************
Junk in the body:
****************
<span id='menu1' onClick='showhide(this.id)' style='cursor
ointer; cursor:hand; font-family:arial; font-weight:bold; font-size:-2'><img id='menu1sign'src='closed.jpg'>
<font face='arial, helvetica' size='-2' color="#660066">
<span>Folder Description</span>
</span>
<br>
<span id='menu1outline' style='display:none'><div style='margin-left: 18'>
<font face='arial, helvetica' size='-2'>
<a href="#" class="media_link" style="text-decoration: none" target="i_frame">Link</a><br>
<a href="#" class="media_link" style="text-decoration: none" target="i_frame">Link</a><br>
<a href="#" class="media_link" style="text-decoration: none" target="i_frame">Link</a><br>
</div>
</span>
<br>
<span id='menu2' onClick='showhide(this.id)' style='cursor
ointer; cursor:hand; font-family:arial; font-weight:bold; font-size:-2'><img id='menu2sign' src='closed.jpg'>
<font face='arial, helvetica' size='-2'>
<span>Folder description 2</span>
</span>
<br>
<span id='menu2outline' style='display:none'>
<div style='margin-left: 18'>
<font face='arial, helvetica' size='-2'>
<a href="#" class="media_link" style="text-decoration: none" target="i_frame">Link</a><br>
<a href="#" class="media_link" style="text-decoration: none" target="i_frame">Link</a><br>
</div>
</span>
<br>
etc....
Not sure if anyone would want to take a crack at this or not...But here's what I've got: It's a small script for creating a menu tree. It works great but I want to modify it so that you can only have one section of the tree open at a time. In other words, when you open a second portion of the tree, it should close the last section that was opened. Not sure how complex this would be but any feedback would be awesome! Thanks
******************
Script in the head section
******************
<script language="javascript">
<!--
var Open = "";
var Closed = "";
function preload(){
if(document.images){
Open = new Image(16,13);
Closed = new Image(16,13);
Open.src = "open.jpg";
Closed.src = "closed.jpg";
}}
function showhide (what) {
if (document.getElementById(what + "outline").style.display=="none"){
document.getElementById(what + "sign").src=Open.src;
document.getElementById(what + "outline").style.display="";
}
else {
document.getElementById(what + "sign").src=Closed.src;
document.getElementById(what + "outline").style.display="none";
}
}
document.onload=preload();
-->
</script>
****************
Junk in the body:
****************
<span id='menu1' onClick='showhide(this.id)' style='cursor

<font face='arial, helvetica' size='-2' color="#660066">
<span>Folder Description</span>
</span>
<br>
<span id='menu1outline' style='display:none'><div style='margin-left: 18'>
<font face='arial, helvetica' size='-2'>
<a href="#" class="media_link" style="text-decoration: none" target="i_frame">Link</a><br>
<a href="#" class="media_link" style="text-decoration: none" target="i_frame">Link</a><br>
<a href="#" class="media_link" style="text-decoration: none" target="i_frame">Link</a><br>
</div>
</span>
<br>
<span id='menu2' onClick='showhide(this.id)' style='cursor

<font face='arial, helvetica' size='-2'>
<span>Folder description 2</span>
</span>
<br>
<span id='menu2outline' style='display:none'>
<div style='margin-left: 18'>
<font face='arial, helvetica' size='-2'>
<a href="#" class="media_link" style="text-decoration: none" target="i_frame">Link</a><br>
<a href="#" class="media_link" style="text-decoration: none" target="i_frame">Link</a><br>
</div>
</span>
<br>
etc....