View Full Version : Menu reappears upon returning to the initial page.

01-21-2007, 08:11 AM
1) Script Title: Anylink Vertical Menu

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

3) Describe problem: If, after following one of the links in the drop-down menu, I hit the back button in the browser, the item that was originally clicked on in the drop-down menu reappears and remains visible until the mouse is moved into the web page window ... is there any way to force the menu not to reappear?

Thanks in advance.

01-21-2007, 11:14 AM
What browser are you using, and does the problem occur in the DD demo for you as well?

01-22-2007, 04:57 AM
The problem appears in Firefox; everything seems to be OK in IE7.
Also, even in Firefox, there is no problem with the demo. Thanks.

01-22-2007, 11:18 AM
Please post a link to the page on your site that contains the problematic script so we can check it out.

01-22-2007, 01:38 PM

01-23-2007, 12:39 PM
Hmmm I can confirm the problem in Firefox 2.x, though not sure immediately what the problem is. Try locating the below line inside the .js file:

document.write('<div id="dropmenudiv" style="visibility:hidden;width: 160px" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)" onClick="hidemenu(event)" ></div>')

The code in red is new.

01-24-2007, 12:02 AM
Thanks for the suggestion. I inserted the new code into menu.js but the problem is still there.

01-24-2007, 04:16 AM
Are you sure? I issue seems to have been fixed for me in FF 2.x on your page now...

01-24-2007, 08:42 PM
Yes and no - yes if you click on one of the links in the drop-down menu itself but no if you click on a link which causes a drop-down menu to appear.

01-24-2007, 10:45 PM
Ok try finding the lines:

if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")

and change that to:

if (e.type=="mouseover")

That should do it. I'm still not sure why you would have this issue to begin with, as it doesn't occur in the DD demo. Probably something specific to your page's layout triggering it.

01-25-2007, 03:09 PM
Thanks again ... but the change did not seem to make a difference - click on the link than come back - menu pops up automatically and stays visible until the cursor is in a firefox window :rolleyes:

01-25-2007, 10:17 PM
Ok, at this point we might as well just do the least elegant but most direct way to get the menu to disppear when the anchor link is clicked on. Inisde each anchor link, add the below:

<a href="http://math.uakron.edu/research/index.html" onClick="hidemenu()" onmouseover="dropdownmenu(this, event, menu4, '250px')" onmouseout="delayhidemenu()">Research</a>

The code in red is new. Repeat this for each anchor link on your page.

01-26-2007, 03:31 AM
It is not elegant, but it works! Many thanks!