Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Show Javascript Navigation Menu expanded in JSP Page....

Status
Not open for further replies.

sheed

Programmer
Jun 14, 2005
38
US
Need some help in the drop down menus. My menu hierarchy is:

Code:
AMenu
|
 -BMenu
 -CMenu
 -DMenu
  |
   -EMenu
   -FMenu
HMenu
|
 IMenu

Above each and every node is a link to some page. AMenu and HMenu are at same level with nested sub-menus. I have this whole nav bar in a separate jsp file and is placed on each page and used IFRAME that contains the above navigation page.
If a user clicks on AMenu it shows some page now in this page how can I show the menu with AMenu Hightlighted with expanded sub-menus and HMenu collapsed. Same way now if a user clicks on CMenu I want to show the AMenu structure expanded with CMenu highlighted and HMenu collapsed. Now if a user clicks on HMenu I just want to show HMenu highligted and expanded while AMenu to be collapsed and minimized.

I have used iframe to hold the Navigation so I can include it in my jsp pages along with other content. Any help is appreciated.

Code:
<html>
............Some content
............
<IFRAME SRC="nav.jsp" width="214" frameborder="0" scrolling="no" marginwidth="0" height="400"
    <!-- Alternate content for non-supporting browsers -->
</IFRAME>
.......................
.................. More Content
</html>

snippet of navigation itself:

Code:
<c onclick="javascript:pull('AMenu12');"><a href="busin.jsp">Business</a></c>
			<d id="AMenu12">
				<ul>
					<li><a href="beg.jsp">BMenu</a></li>
					<li><a href="end.jsp">CMenu</a></li>
					<li><a href="start.jsp">DMenu</a></li>
					<li><a href="go1.jsp">&nbsp;&nbsp;EMenu</a></li>
					<li><a href="main.html">&nbsp;&nbsp;FMenu</a></li>
				</ul>
			</d>
		<c onclick="javascript:pull('HMenu22');"><a href="#">Contact</a></c>
			<d id="HMenu22">
				<ul>
					<li><a href="mail.jsp">IMenu</a></li>
				</ul>
			</d>

Actually I wanted to make DMenu to collapse too but can't figure out how to do it so just have indented.

Thanks
 
In the future please do not cross-post across forums - this post should be posted in the javascript forum - which I see you have also done !

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top