Dropdown Menu

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dennis M. Marks

    Dropdown Menu

    Is there a javascript alternative to the dropdown menu in a form
    (SELECT OPTION). I would like the ability to pass a selected item to a
    function but I would like more control in the design of the menu. I
    would like to have different colors within a single line of the menu
    and different colors on selected lines. It would also be nice to have
    the initial "button" a small size that would widen when dropped down.

    My existing page is within my web site
    http://www.dcs-chico.com/~denmarks/ Select Amtrak from the menu at the
    left. I would like more control over placement, size, and colors of the
    three dropdown menus.

    --
    Dennis M. Marks


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
  • Michael Winter

    #2
    Re: Dropdown Menu

    Dennis M. Marks wrote on 29 Nov 2003:
    [color=blue]
    > Is there a javascript alternative to the dropdown menu in a form
    > (SELECT OPTION). I would like the ability to pass a selected
    > item to a function but I would like more control in the design
    > of the menu. I would like to have different colors within a
    > single line of the menu and different colors on selected lines.
    > It would also be nice to have the initial "button" a small size
    > that would widen when dropped down.
    >
    > My existing page is within my web site
    > http://www.dcs-chico.com/~denmarks/ Select Amtrak from the menu
    > at the left. I would like more control over placement, size, and
    > colors of the three dropdown menus.[/color]

    You can do this with style sheets in Internet Explorer by specifying
    the background-color and color styles. This didn't work in my version
    of Opera (7.22 - latest) and might not work in Mozilla or Netscape.
    For example:

    <SELECT>
    <OPTION style="backgrou nd-color: #000000; color: #ffffff"[color=blue]
    >Item 1</OPTION>[/color]
    <OPTION style="color: #000000; background-color: #ffffff"[color=blue]
    >Item 2</OPTION>[/color]
    <OPTION style="backgrou nd-color: #000000; color: #ffffff"[color=blue]
    >Item 3</OPTION>[/color]
    <OPTION style="color: #000000; background-color: #ffffff"[color=blue]
    >Item 4</OPTION>[/color]
    </SELECT>

    Of course, using classes would make much more sense.

    Mike

    --
    Michael Winter
    M.Winter@blueyo nder.co.uk.invalid (remove ".invalid" to reply)

    Comment

    Working...