Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

dazzer21

macrumors 6502
Original poster
Oct 18, 2005
473
4
From Dreamweaver (3!), I'm looking to being able to do the following. I know NOTHING about the mechanics of how to do this (my inkling is that CSS is going to crop up here somewhere - but I'm willing to learn...) :eek:

I'm trying to put together a system whereby there are two drop-down menus relating to each other.

For example:
In the top menu are three items: A, B & C
In the next menu down resides three items: 1, 2 & 3

However, what I'm after is a way where, if 'A' was chosen at the top, only '1' and '2' show up on the next menu. If 'B' were chosen, only '3' would appear on the bottom menu. And if 'C' were to be chosen, '1', '2' and '3' would all appear.

IE the choice in the top menu dictates what appears in the second. Can this be done (relatively) easily? :eek:
 
There's two main ways to do this.
  1. Have them make the selection, hit a next or continue button, and show the new drop menu on the following page.
  2. Use JavaScript to dynamically change the contents of the second menu based on the first. There's tutorials for this.
Method one will work for everyone though requires extra page loads. The second method is quicker, but blocks out some people due to requiring JavaScript.
 
From Dreamweaver (3!), I'm looking to being able to do the following. I know NOTHING about the mechanics of how to do this (my inkling is that CSS is going to crop up here somewhere - but I'm willing to learn...) :eek:

I'm trying to put together a system whereby there are two drop-down menus relating to each other.

For example:
In the top menu are three items: A, B & C
In the next menu down resides three items: 1, 2 & 3

However, what I'm after is a way where, if 'A' was chosen at the top, only '1' and '2' show up on the next menu. If 'B' were chosen, only '3' would appear on the bottom menu. And if 'C' were to be chosen, '1', '2' and '3' would all appear.

IE the choice in the top menu dictates what appears in the second. Can this be done (relatively) easily? :eek:



Here is a link to a really great article [ step by step with code ] showing how to do drop down menus with just 12 lines of javascript, a dash of css and your html list.

http://htmldog.com/articles/suckerfish/dropdowns/

enjoy
M!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.