PDA

View Full Version : Anylink Drop Down Menu Issue



michaelb
04-30-2008, 01:31 PM
1) Script Title: Anylink Drop Down Menu

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm

3) Describe problem: --------------------------------------------------------------------------------

hi - sorry if this is a stupid question
everything works fine on my site except i can't seem to add workable links to the topmost menu item (the sub-items work fine)

as an example: on the "demo" in the anylink Drop Down Menu
page on dynamicdrive.com, the menu shows: web design, technology, news sites. None of the top links work.. all the links on the drop down work fine.

I'm having the same problem with my site.. all the drop down menu items all link fine but the top level doesn't hyperlink at all..

i need to have a general link and also the variables as links as well.

any thoughts?

jscheuer1
04-30-2008, 02:29 PM
That is by design. What happens is that those top level links only fire if javascript is disabled. If you go with it like that, they can be a backup for non-javascript enabled browsers - for accessibility purposes - say, they could take the non-javascript user to a page with a menu that has the same links on it that the drop down has.

However, depending upon the overall design of the pages and links involved, like if all of the links on a drop down are to anchors on a single page, you might want the top link to also be to that page, and to have it fire even when javascript is enabled.

Now, this obviously makes no sense if the drop down activates onclick, you'd never see it. But, for drop downs that activate onmouseover, simply remove this (highlighted) from the link:


<a href="default.htm" onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, '150px')" onMouseout="delayhidemenu()">Web Design</a>

michaelb
04-30-2008, 02:35 PM
thanks so much.. works perfectly..