PDA

View Full Version : AnyLink Drop-Down Menu Help Needed



moorefaith
03-30-2005, 08:33 PM
Script: AnyLink Drop-Down Menu Help Needed
http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm

The description of the script action says that you can use images as links for this script. I have a "menu bar" for my navigation that is a table of images used as links, and I've modified the script in only the places allowed, but I keep receiving an error on the page when I mouse over one of the image links. I've searched and searched through the code, and I must be blind because I can't see what's wrong. I'm about ready to pull my hair out by the roots (so I will be a bald, blind woman - not pretty! :eek: ). Can someone give me a hand? :D

Here's a link to what Ive got so far:
my pitiful attempt (http://sunrisewindows.com/navbkgrnd.html)

Thanks in advance for your help - please remember that I'm a little dim-witted, so I appreciate your patience!

Amanda

mwinter
03-30-2005, 09:01 PM
The description of the script action says that you can use images as links for this script.Be that as it may, I see no reason for you to actually use images. Still, if you really must, you should at least provide alternative text.


Can someone give me a hand?Presumably, you don't use Mozilla or Opera for development. The script debugging tools for both applications would have pointed you to the problem straight away:


menu3[5]='<a href="http://news.bbc.co.uk">Window Buyer's Tools</a>'You have a nested, but unescaped, single quote within that string literal. Correct that and the script will run fine.

If my guess was correct and you do use IE for development, please do the Web, and yourself, a favour and stop. IE is too lenient and will allow you to fall into bad habits. Not only that, but IE's numerous bugs don't make for a reliable representation of what you're actually writing.

Mike

mwinter
03-30-2005, 09:22 PM
If my guess was correct and you do use IE for development, please do the Web, and yourself, a favour and stop.That came out with the wrong tone. It wasn't meant to sound harsh, but on re-reading it does. However, I think you get the point from the rest of the paragraph: IE is not a user agent that should be used for development testing until after you've finished, or reached certain milestones. You'll produce something far more robust using a more conforming user agent.

Mike

moorefaith
03-30-2005, 09:36 PM
mwinter:

Thank you! That was exactly what was bugging up the script. One little backslash, and it was fixed. Your eye caught what mine couldn't.


Be that as it may, I see no reason for you to actually use images. Still, if you really must, you should at least provide alternative text.

I guess I'm not savvy enough at this to achieve the same look without images, though I have been trying. I am more of a designer than a developer, and I use what I am familiar with - namely, graphics.


However, I think you get the point from the rest of the paragraph: IE is not a user agent that should be used for development testing until after you've finished, or reached certain milestones. You'll produce something far more robust using a more conforming user agent.

I will do as you suggest if my firewall here at work will permit me to download Mozilla and/or Opera (it does not let me get Netscape). I know that I should be testing in other browsers than IE - I have heard the gospel according to developer's before. :)

Thank you very much for your help - I really appreciate it!

Amanda

moorefaith
03-30-2005, 11:32 PM
This may or may not be related to the script, but I'm hoping that someone can help me anyway. :confused:

I have got the navigation bar "working" the way I want it to now, thanks to mwinter and a bit of other research. But it's also not working. right underneath the navigation bar, I have a Flash animation looping through. When you mouse over the navigation bar, the drop-downs are there but underneath the animation. Is there any way to make sure that the drop-downs show up over the animation?

Here's what's happening. I hope you can see - look inside the red circle.
Hidden Drop Down (http://sunrisewindows.com/navbkgrnd.html)

Thanks again to anyone who can help!

Amanda

mwinter
03-31-2005, 12:32 AM
mwinter:Mike will do fine. :rolleyes:


I guess I'm not savvy enough at this to achieve the same look without images, though I have been trying.You'd have to use images, but not for the text. Just the top edge and the sides.

It's not quite as simple as I'd hoped because of IE being a pain. Opera was too, but it's problem was simple to solve.

I've uploaded an example (http://mwinter.webhop.info/dd/moorefaith/example.html). I'll also link the top (http://mwinter.webhop.info/dd/moorefaith/border.png), left (http://mwinter.webhop.info/dd/moorefaith/border-left.png), and right (http://mwinter.webhop.info/dd/moorefaith/border-right.png) border images for convenience. The style sheet looks excessive, but it's as small as you're going to get it. The advantage with this approach though is that it's more accessible: the page can be resized and the thing will grow automatically. The only problem is if the block wraps. Unless you make the side images very tall, they won't stretch all the way to the bottom. That's a minor issue, though.

I haven't tried integrating this with the menu code. I'm not sure how well that takes a marked-up list (which is the proper way, unsurprisingly, to mark-up a list of links).


I have heard the gospel according to developer's before.Seriously, IE is pants! I can't tell you how much grief that :eek: has given me. Other user agents, like Opera and Mozilla, aren't perfect of course, but they're by far, superior.


This may or may not be related to the scriptIt's not.


When you mouse over the navigation bar, the drop-downs are there but underneath the [Flash] animation.This is a common problem. It happens with form controls, too. Most plug-ins render themselves in a new window (that is, a window in the realm of the OS, which isn't the same as the normal concept of a window), so the user agent has little control over it. Macromedia have a partial solution (http://www.macromedia.com/go/tn_15523) (see the accompanying document, too), but it's limited to certain platform/user agent combinations. Another solution is to perform hit-testing - when the menu is determined to be over the animation, you could hide the container temporarily. The final, obvious solution, is to move the animation away from the menu. :D

Hope that helps,
Mike

moorefaith
03-31-2005, 01:37 AM
Thanks, Mike, for all your help. Unfortunately, I am now away from work and don't have a "proper" computer for checking out what you've done for me. But I'm looking forward to investigating it in the morning.

You said that the menu falling behind the flash animation is a common problem and does not have a comprehensive solution. I will check into the information you supplied, but I am curious to see what your take on this (http://www.pella.com) site is - how did they solve that problem? (Can you hear the whine in my voice? Sorry.)

Hey, I really do appreciate all your work and advice. I'm under a deadline here, and your quick responses have been a huge relief!

Thanks again!

Amanda :o

jscheuer1
03-31-2005, 03:29 AM
The way that site does it is by having the drop down menu written in flash as part of the flash presentation.

moorefaith
03-31-2005, 01:14 PM
I see. Thanks. I guess this means back to the drawing board! :(