473,597 Members | 2,341 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2615
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 "functional ity" 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*********@kde talk.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.de wrote in message
news:tk******** *************** *********@4ax.c om...
.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.mozil la.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
2916
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 toggleClamShellMenu(objectID) { var object = document.getElementById(objectID);
0
2119
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 org, However, I haven't gotten a reply for a week or so, and figured out I could post here for a larger audience, then. Original message follows: Hello,
1
2322
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 foc=loc.parentNode.nextSibling.style?. Is there a fix to make Firefox happy? thanks, Mike
4
1642
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 to a central rectangle by a single vector, e.g. a straight line. When an onMouseDown event is raised on a rectangular object a click and drag operation will expand or collapse the starred diagram, e.g. zoom when dragged. When an onClick event is...
4
2178
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 they are not maximized when they load. Unfortunately, this seems to have had the consequence of removing them from the Windows taskbar, which makes navigating between open forms more difficult. How would you developers deal with navigation between...
5
5847
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 users to click on another category and have that expand). Example:
7
2673
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 menu then hide it again ... haven't found anything that allows erasing or rewriting ... Thanks.
4
1077
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 membership roles). Each type of user will have access to a different set of pages. I can use roles to specify which pages can be accessed by which type of user. But I'm trying to determine the best way to display navigation for each type of...
0
7971
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7893
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8276
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
6698
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5847
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3889
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2408
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1495
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1243
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.