PDA

View Full Version : Clicking on the Anylink dropdown menu



clappingtree
12-22-2006, 06:44 AM
1) Script Title: AnyLink Drop Down Menu

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

3) Describe problem:

Clicking on items on the menu (e.g. Inhouse Workshops, Public Workshops) brings up the right pages.

However, clicking on the menu name itself (e.g. Workshops) does not show the linked page.

Coding is as-given. Is this how the menu works? Hope not. What can I do to

Much thanks in anticipation. :-)

ddadmin
12-22-2006, 10:47 AM
Yep, you can toggle this behavior near the top of the script:


var hidemenu_onclick="yes" //hide menu when user clicks within menu?

Set it to "no."

clappingtree
12-22-2006, 12:57 PM
Thank you.

Hope it works. Have made the change and nothing seems to have changed.

A related question: Does script take a longer time (like stylesheets) to be updated/reflected on a website?

So far, I've noticed that changes made to stylesheets or javascripts don't seem to show until a long time after. Tried to clear cache, delete temporary files, etc. but to no avail.

Is there something else I can do to speed things up?

ddadmin
12-22-2006, 01:43 PM
The changes should be instantaneous, both with the change I posted above, and changes to your CSS. To prevent your browser from potentially caching your files, press "shift" reload. In other words, hold down the shift key while reloading.

clappingtree
12-22-2006, 02:49 PM
Sigh! Still can't get the click on the menu name.

Shift+Load opens a new window on the menu name, but after that, clicking on the menu name still gets no response.

Now, got an error message:


delayhidemenu is not defined
onmouseout( )

:confused:

jscheuer1
12-22-2006, 04:06 PM
I think ddadmin misunderstood your question, though I could be wrong. Anyways, as I see it, you are not concerned about the menu disappearing when clicked, so should have left that part alone. It seems to me that you want (as have many others) for the the trigger links (which ordinarily do nothing but trigger the appearance of the drop downs unless javascript is disabled) to actually work as links when clicked.

Now, this doesn't make much sense unless you are using onmouseover to trigger the drop downs. If you are, just remove the onclick event (red) from the triggers (example from the demo page):



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

clappingtree
12-22-2006, 06:30 PM
Thank you! You are right. :-)

ddadmin
12-23-2006, 12:18 AM
Well you can always count on John to straighten things out. :) Actually I didn't misunderstand the question, just got absent minded when it came to what the setting:


var hidemenu_onclick="yes" //hide menu when user clicks within menu?

actually does. FYI it's for hiding the menu when the user clicks anywhere on the page.