Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > need some help with drop down menu

Reply
Thread Tools

need some help with drop down menu

 
 
mjeassoc@aol.com
Guest
Posts: n/a
 
      11-11-2005
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

 
Reply With Quote
 
 
 
 
Safalra
Guest
Posts: n/a
 
      11-11-2005
On 11 Nov 2005 13:03:42 -0800, http://www.velocityreviews.com/forums/(E-Mail Removed) 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/j.../dropdown.html

--
Safalra (Stephen Morley)
http://www.safalra.com/programming/javascript/
 
Reply With Quote
 
 
 
 
mjeassoc@aol.com
Guest
Posts: n/a
 
      11-13-2005
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Affecting a dynamically created drop down from another dynamically created drop down. msimmons ASP .Net 0 07-16-2009 03:17 PM
retrive preselected value in second drop down list from the first drop down list weiwei ASP .Net 0 01-05-2007 07:29 PM
Multiple select drop down poplulating sub drop down scott@dettcom.com Javascript 3 11-09-2006 07:50 PM
Auto Drop down a Drop Down List xxbmichae1@supergambler.com Javascript 5 11-23-2005 01:35 AM
New to .NET, can I have one drop down box control the data of another drop down box using a database? SirPoonga ASP .Net 2 01-07-2005 10:44 PM



Advertisments