View Full Version : AnyLink Drop Down - Top Level Links?

02-13-2007, 11:23 PM
1) Script Title: AnyLink Drop Down Menu

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

3) Describe problem: I've implemented the AnyLink script using images and successfully incorporated a rollover script as well. Now, I just realized that my top-level images aren't clickable links...which I've discovered is also the case in the sample on the script's page here at DD. How can I modify this script to make my top-level menu images clickable links? Do I need to modify the onclick property?

I noticed that if I delete the "return clickreturnvalue()" from the onclick property, the link will indeed click through. It seems to work fine this way, but I don't know if there's some secret damage waiting to show itself down the road...?

This is what a link looks like:
<a href="seasonpage.html" onClick="return clickreturnvalue()" onMouseover="rollover('season'),dropdownmenu(this, event, menu1, '185px')" onMouseout="rollout('season'),delayhidemenu()"><img name="season" border="0" src="menu_season.jpg" /></a>

What do you think?

02-14-2007, 02:44 AM
No secret damage. The only purpose of the:

onClick="return clickreturnvalue()"

is precisely to prevent the link from working as, most folks don't want it to.

You see, what can be done is that since, without javascript, there will be no drop downs, and the link will work even with the above event (ignored in non-javascript enabled browsers), it can be for alternate non-javascript enabled content. However, it is perfectly fine to get rid of the onclick event and use the link if you like. Especially if it takes you to a page where the drop down choices from that link are available.

02-14-2007, 05:16 AM
That is precisely what I intend to do with the link! Thanks for the help.