Log in

View Full Version : how do I create expandable menus?



gib65
11-19-2011, 02:25 AM
Hello,

I'm looking for a way to create expandable menus on a web page - "expandable" meaning a tree structure that you can collapse or expanding depending on how deep into the tree you want to go.

The kind of thing I'm looking for can be seen on this Microsoft web page: http://support.microsoft.com/kb/278835. Scroll to the bottom where it says "applies to". To the left of it, there's a box with a plus sign in it. You can click on it and it expands a list. The plus sign changes to a minus sign, and if you click on it again, the list collapses. This is a very simple tree - only one level deep - but I've seen other expandable lists/trees like this in which even the list items in the expanded branch have the little boxes with the plus signs, and clicking on those boxes opens up another layer of list items.

I'm sure this must involves some javascript or DHTML, maybe even some server side code such as ASP.NET or VB or C#. Can someone explain to me how this works or at least point me in the right direction? Thanks very much.

djr33
11-19-2011, 06:02 AM
That can't be done with anything serverside because serverside code operates on the server-- so it doesn't interact with the user. You need something clientside, such as Javascript (or a plugin, like Flash).

There are a few menus like this available in the DD library. Take a look at those first and see if one works. If not, explain why and we can try to point you in the right direction.

gib65
11-20-2011, 02:52 AM
All right, I'll have a look. Thanks djr33.

ajfmrf
11-21-2011, 02:40 AM
http://www.web-user.net/menu/14/index.html

It is the one level down.

Bud