• 0

Treeview menu on site?


Question

1 answer to this question

Recommended Posts

  • 0

I just did something like that for my company. Here's a bit of my code to show you how I did it.

// Expand/collapse the navigation section

function ToggleExpand(oElement)

{

try

{

if (oElement.src.indexOf("/images/closed.gif") > -1)

{

oElement.src = "/images/open.gif";

oElement.parentElement.all.tags("div").item(0).st yle.display = "";

}

else

{

oElement.src = "/images/closed.gif";

oElement.parentElement.all.tags("div").item(0). style.display = "none";

}

}

catch(e)

{

}

}

<div style="POSITION: relative">

<img style="POSITION: relative; CURSOR: hand; LEFT: 11px" onclick="ToggleExpand(this)" src="/images/closed.gif" />

<span style="POSITION: relative; LEFT: 13px; CURSOR: hand" ondblclick="ToggleExpand(this.parentElement.firstChild)" id="NavEliPri">Primary Policy</span>

<div style="DISPLAY: none; POSITION: relative">

<div style="POSITION: relative">

<span style="POSITION: relative; LEFT: 30px; CURSOR: hand" id="NavEliPriGen">General</span>

</div>

<div style="POSITION: relative">

<span style="POSITION: relative; LEFT: 30px; CURSOR: hand" id="NavEliPriPay">Payer</span>

</div>

<div style="POSITION: relative">

<span style="POSITION: relative; LEFT: 30px; CURSOR: hand" id="NavEliPriPat">Patient</span>

</div>

<div style="POSITION: relative">

<span style="POSITION: relative; LEFT: 30px; CURSOR: hand" id="NavEliPriSub">Subscriber</span>

</div>

<div style="POSITION: relative">

<span style="POSITION: relative; LEFT: 30px; CURSOR: hand" id="NavEliPriRes">Responsible Party</span>

</div>

</div>

</div>

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.