need some help with drop down menu

Discussion in 'Javascript' started by mjeassoc@aol.com, Nov 11, 2005.

  1. Guest

    I have a fairly simple page serving as a portfolio. It is a long page,
    with narrative and large thumbs which link to other pages, larger
    photos, pdf files, etc.

    Near the top of the page, I have a drop down SELECT form serving as a
    menu to the page.

    Two things bother me about it.

    There are 11 sections listed (less the first line, which is just a
    title "Portfolio Index"). But only 10 lines appear when the drop down
    is selected. I would like them all to show in the box (and I may add
    another line or two).

    Secondly, after each section on the page, I have a jump back link to
    the top of the page. When this is done, the drop down shows the last
    section selected. I would like to force it to show the top line,
    "Portfolio Index" each time.

    Thanks in advance...

    MJE
    , Nov 11, 2005
    #1
    1. Advertising

  2. Safalra Guest

    On 11 Nov 2005 13:03:42 -0800, wrote:
    > [snip - using select for a menu]
    > There are 11 sections listed (less the first line, which is just a
    > title "Portfolio Index"). But only 10 lines appear when the drop down
    > is selected. I would like them all to show in the box (and I may add
    > another line or two).
    >
    > Secondly, after each section on the page, I have a jump back link to
    > the top of the page. When this is done, the drop down shows the last
    > section selected. I would like to force it to show the top line,
    > "Portfolio Index" each time.


    Select elements behave like this because they were designed for use in
    forms. I'm sure your second problem can be fixed in Javascript (I'll leave
    it to another poster to say how), but your first problem is due to a design
    decision on the part of the browser makers (to make forms usable) and
    cannot be overridden. The solution is to use a div element for the
    drop-down menu, rather than a select element. Here's a very simple way
    (that is, it uses very little code) of doing a menu using divs that also
    degrades nicely:

    http://www.safalra.com/programming/javascript/dropdown.html

    --
    Safalra (Stephen Morley)
    http://www.safalra.com/programming/javascript/
    Safalra, Nov 11, 2005
    #2
    1. Advertising

  3. Guest

    Thanks for you suggestion Stephen...

    I'll take a look at your code, but someone else (in a PM) showed me how
    to solve the second problem, so I may leave it as a form select, and
    figure out how to consolidate it to 10 lines or less.
    , Nov 13, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SirPoonga
    Replies:
    2
    Views:
    745
    Ben Strackany
    Jan 7, 2005
  2. weiwei
    Replies:
    0
    Views:
    1,002
    weiwei
    Jan 5, 2007
  3. msimmons
    Replies:
    0
    Views:
    461
    msimmons
    Jul 16, 2009
  4. Replies:
    5
    Views:
    255
  5. Replies:
    3
    Views:
    277
Loading...

Share This Page