Drop down menus

Discussion in 'Web Design and Development' started by dazzer21, Feb 10, 2010.

  1. dazzer21 macrumors 6502

    Joined:
    Oct 18, 2005
    #1
    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:
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    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.
     
  3. digitalField macrumors regular

    Joined:
    May 21, 2004
    Location:
    portland
    #3


    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!
     

Share This Page