473,406 Members | 2,956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

How to Do Collapsible Navigation Menus?

In my application, I'm going to have a navigation pane (i.e. frames) on the
left that links to pages that display in the main window. The list of
choices varies by user, but once a user logs in, it is always the same list.

I'm going to arrange this pane as a hierarchical list of headings,
subheadings, and links, i.e. something like:

Number Theory Tools
Euclid's GCD Algorithm
Continued Fraction Expansion of a Rational Number
LCM
Miller-Rabin Probable Primality Test
Calculation Tools
Arbitrary Expression Evaluation

Etc.

Because there will be so many choices, I'd like to have the ability to
collapse and uncollapse parts of the list, hierarchically. One should, for
example, be able to "collapse" the "Number Theory Tools" part of the list so
that only the heading shows, then uncollapse it later.

What is the best way to accomplish this?

Are there any clever tricks to avoid re-loading the left pane on each
collapse/expand?

Thanks.
--
David T. Ashley (dt*@e3ft.com)
http://www.e3ft.com (Consulting Home Page)
http://www.dtashley.com (Personal Home Page)
http://gpl.e3ft.com (GPL Publications and Projects)
Jun 12 '07 #1
4 2602
David T. Ashley wrote:
[...] I'd like to have the ability to collapse and uncollapse parts of the
list, hierarchically.[...]

What is the best way to accomplish this?
Use no-javascript, pure CSS, drop-down menus. There are a couple different
implementations on the web, so search for 'em.
Are there any clever tricks to avoid re-loading the left pane on each
collapse/expand?
Most of the "functionality" is on the .css file, that is cached and saves
bandwidth. And for the options, they are *all* in the HTML. Being <li>s,
the whole menu is pretty small.

--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

http://acm.asoc.fi.upm.es/~mr/ ; http://acm.asoc.fi.upm.es/~ivan/
MSN:i_*************************@hotmail.com
Jabber:iv*********@jabber.org ; iv*********@kdetalk.net
Jun 12 '07 #2
..oO(Iván Sánchez Ortega)
>David T. Ashley wrote:
>[...] I'd like to have the ability to collapse and uncollapse parts of the
list, hierarchically.[...]

What is the best way to accomplish this?

Use no-javascript, pure CSS, drop-down menus.
A properly built JS-based menu is usually more usable and accessible
than a CSS menu. You can implement keyboard navigation and timeouts, so
that the menu stays open for half a second or longer, even if the mouse
pointer leaves the hover area. With pure CSS that's impossible.

Micha
Jun 12 '07 #3
"Michael Fesser" <ne*****@gmx.dewrote in message
news:tk********************************@4ax.com...
.oO(Iván Sánchez Ortega)
>>David T. Ashley wrote:
>>[...] I'd like to have the ability to collapse and uncollapse parts of
the
list, hierarchically.[...]

What is the best way to accomplish this?

Use no-javascript, pure CSS, drop-down menus.

A properly built JS-based menu is usually more usable and accessible
than a CSS menu. You can implement keyboard navigation and timeouts, so
that the menu stays open for half a second or longer, even if the mouse
pointer leaves the hover area. With pure CSS that's impossible.

Micha
Thank you both. I did search the web and found things that are very similar
to what I want using JavaScript.

So, we're down to my next question ...

Can anyone recommend any books on JavaScript that are tailored for how to
write scripts for web browsers?

Thanks.
Jun 12 '07 #4
David T. Ashley wrote:
Can anyone recommend any books on JavaScript that are tailored for how to
write scripts for web browsers?
Regardless of the book, I recommend developer.mozilla.com as a good
javascript *and* DOM object reference.

Oh, and try firebug for debugging purposes. Just great.

--
----------------------------------
Iván Sánchez Ortega -ivansanchez-algarroba-escomposlinux-punto-org-

Go to a movie tonight. Darkness becomes you.

Jun 12 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: develeigh | last post by:
Hi, I have got this Collapsible Menus, it uses combination of JavaScript and CSS. Javascript when executed changes the inital CSS settings to make the sub menu visable function...
0
by: Veli-Pekka Tätilä | last post by:
Hi, My first post here. I've found some serious accessibility flaws in the Python 2.4 docs and wish they could be rectified over time. I'm very new to Python and initially contacted docs at python...
1
by: mike | last post by:
The JavaScript below works fine for expandable/collapsible menus in IE, but Firefox 1.5 complains: "Error: loc.parentNode.nextSibling has no properties" and highlights the line...
4
by: clintonG | last post by:
Boy that's a helluva subject heh? But that's what I'm looking for. A navigation control that has a series of rectangles (each representing a star in the pattern) where each rectangle is connected...
4
by: robert.waters | last post by:
Hello, I have a main form that is maximized when my application loads; this main form contains links to all other forms. I've had to specify the Popup property of these other forms, so that...
5
by: Jonathan | last post by:
Hello All, I am in the process of creating a 2/3 level collapsible/exspanible menu (called "nav") where users can click on a category and have the submenus appear beneath it and so on (allow...
7
by: David T. Ashley | last post by:
I'm trying to implement these ... I know there is a lot of example code on the web, but I'm trying to roll my own ... What JavaScript functionality is typically used to display parts of the...
4
by: Jonathan Wood | last post by:
I'm still pretty new to ASP.NET. I'm developing a site that requires all users to log on. Once logged on, I can determine which of three types of users they are (types are implemented using ASP.NET...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.