Close Search Box
Search Box

Search: From:

Close
Newsletter

9Tutorials to your Inbox



Creating a Multilayer Drop-Down Menu

Creating a Multilayer Drop-Down Menu
Author lv1 (2000/5000)
4,357 views
1 Star2 Star3Star4 Star5 Star (6 votes, average: 4.33 out of 5)

When creating a website, navigation is always a problem. On a large complicated website, it can become a burden. Sometimes, having hierarchical drop-down menus can make this easier, allowing for a small amount of space on the screen to be used (the initial menu) to present a complicated menu system.

This can be accomplished through the use of JavaScript, XHTML, and CSS. PHP makes the task easier because it can be configured within PHP, and then PHP can automatically generate the code needed.This tutorial ends up creating a function that you can call, passing it a number of configuration parameters, and it creates a menu system for you. It is designed to work in most modern browsers and can be called multiple times on the same web page. Note that it uses both JavaScript and CSS to create the effect; although pure CSS methods exist for creating a menu such as this, they do not work in many browsers as of the creation of this book. Therefore that exercise is left up to the reader.

The heart of this program is the fact that PHP generates the JavaScript and CSS custom to the menu at hand. This allows for a generic function that can be called multiple times on the same web page. All menus, css, and so on are indexed by a series of characters automatically created and updated for each menu. This is a base setup that generates one particular style of menus, a vertical navigation bar meant to be used on the left side of a website. Slight changes could allow this to be manipulated into any form needed.

 

del.icio.us:Creating a Multilayer Drop-Down Menu digg:Creating a Multilayer Drop-Down Menu spurl:Creating a Multilayer Drop-Down Menu newsvine:Creating a Multilayer Drop-Down Menu blinklist:Creating a Multilayer Drop-Down Menu furl:Creating a Multilayer Drop-Down Menu reddit:Creating a Multilayer Drop-Down Menu blogmarks:Creating a Multilayer Drop-Down Menu Y!:Creating a Multilayer Drop-Down Menu magnolia:Creating a Multilayer Drop-Down Menu segnalo:Creating a Multilayer Drop-Down Menu
Login




Friends' Sites

Contact Us

Categories

Sponsors

Featured Links

Post a Comment »








Safari hates me

Comment Guidelines

  • Hyperlinks are automatically generated.
  • <em>italic</em>
  • <strong>bold</strong>