need some help with drop down menu

M

mjeassoc

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
 
S

Safalra

[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
 
M

mjeassoc

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top