View Full Version : AnyLink Dropdown Menu

07-01-2005, 09:05 PM
I am having trouble with the following script: http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm.

I was using the script using an i-frame layout, and I guess that could be the problem, but I couldn't figure out a solution. However, it had worked ONCE before, but it had been halfway cut off by another frame. I had tried to fix it and I ended up in my present situation: http://www.freewebs.com/wizardsrealm/indexwine.html.

If anyone is able to tell me what is wrong exactly and how I can fix it, please let me know.

07-01-2005, 09:24 PM
Error: unterminated string literal
Source File: http://www.freewebs.com/wizardsrealm/nav.html
Line: 36, Column: 9
Source Code:
menu2[0]='<a href="new.html">Link</a>

It should be:

menu2[0]='<a href="new.html">Link</a>'

Gotta fix that first, could be other things.

07-01-2005, 09:30 PM
Ah! I never saw that! Wow, thank you!

I fixed it as you suggested, but the menu is still not visible.
Possibly the I-frames?

07-01-2005, 09:50 PM
Now you have:

Error: unterminated string literal
Source File: http://www.freewebs.com/wizardsrealm/nav.html
Line: 49, Column: 15
Source Code:
document.write('<div id="dropmenudiv"

The fix for this is just a little more complicated, it is actually written correctly except that the lines in the code are broken up:
document.write('<div id="dropmenudiv"
onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')should be:
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')Once again, there could be other things, gotta fix this first to tell. BTW do you have Firefox or NS7.2? With either one of those browsers you could use the javascript console to debug this, just as I have been doing.

07-01-2005, 09:55 PM
No, sadly. I have Microsoft Internet Explorer....
I'm sorry for all the errors. ><

07-01-2005, 09:58 PM
Oh! It works now! Thank you very much!
Now I have to fix it so it isn't covered by the frame... >< Do you have any quick suggestions?

07-01-2005, 10:24 PM
Well, a quick suggestion would be to use 1 less link item per drop down, that way the drop downs might fit in the frame they are in. They've become drop ups though because there isn't enough room in the frame for them to drop down from their present location. I'd also try positioning them at the top of the image map. I'd at least want to see if that helped. There are other problems. In both IE6 and FF, the only way I know to look for a menu is that you told me that there was one. Otherwise, I'd never see it. Once I get a drop down, there is nothing on it unless I hover over it.

07-01-2005, 10:25 PM
Thank you for your suggestion and help!

07-02-2005, 08:25 PM
I fixed it so that the navigation is more obvious, but I'm unable to posititon the menu correctly...
I looked at other threads, but they only show how to move the menu to the right and I wish to move my menu up.

07-02-2005, 08:52 PM
border:1px solid black;
font:normal 12px Verdana;
... where 15px is the distance from the top of the page.

07-02-2005, 09:13 PM
Twey's suggestion might work out but, my thinking was that, since you were keying the menu off of an image map, if you still are, just change the coords attributes' positions to higher up on the image, like at the top of it (they were near the bottom).

07-02-2005, 10:06 PM
Changing the coordinates worked. Thank you!