Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:30

Images not appearing on menu


Poster: pdof __at__ earthlink.net
Dated: Monday October 3 2005 - 2:50:34 BST

Hello! I hope someone can help me:

I am using the menu successfully and am happy with its appearance. However I want to use the same menu (with the same menu_data.js file) on sub-pages, which are located in directories.

As soon as I put the menu on a page inside a directory, the images disappear. I've spent 5 hours on this problem, and by changing the source code as such: "../images/image.gif" and "images/image.gif" and so on, I can get them to appear alternately on either the root page or the subdirectory page, but not on both at the same time.

Help!! I know this must have a simple solution, but I've tried everything I can think of and nothing works.. I still get the dreaded red "X" where my images should be. :cry:

Can anyone help me with this? Thanks! By the way, my menu is inside a table, in case that makes a difference.


Poster: Ruth
Dated: Monday October 3 2005 - 22:03:10 BST

Have you tried the full path to the image instead of relative paths?

Ruth

Images not appearing on child menus


Poster: pdof __at__ earthlink.net
Dated: Tuesday October 4 2005 - 13:51:44 BST

Hello Ruth! Yes, I tried that and that didn't work either. I got a very lengthy, very detailed email from Steve, another user who had the same problem and was able to fix it. However, I followed his instructions and they didn't work for me.

Do you have any other suggestions? I need to be able to use this menu on every page of my site (whether located in a sub-directory or a root directory), with the ability to make a change to the menu and have it automatically replicate throughout the site (in other words, building a separate menu for each subdirectory is not an option for me... we will probably have 25-30 subdirectories).

This is for a school; it is a free license so I'm not entitled to tech support; my only option is for some kind soul to voluntarily help me figure this out! Thanks for trying... let me know if you have any other suggestions.


Poster: John
Dated: Thursday October 6 2005 - 19:42:54 BST

You are entitled to all the resources of this forum. However, we need a bit more than you've given us. A URL (as requested) would be most helpful.


Poster: kendra
Dated: Saturday October 8 2005 - 18:02:50 BST

I think I get what his problem might be.. I had the problem when I set the image path based on the location of menu_data.js, you need to use the path for the page, not the menu files.

To fix the problem just create a global folder called /menu for all your menu files then use a root relative path its alot less confusing as you have only 1 set of menu files for the whole site.

1) create a /menu folder
2) copy all your menu files to there

Now when you need your menu files just use the root relative path.

NOTE:You NEED the starting slash, thats most important. This will tell the src to start back in the root so /menu is the same as http://mysite.com/menu


example:

<script type="text/javascript" src="/menu/menu_data.js"></script>
same goes for your images...

overimage="/menu/whitedots.gif";

This will fix the probem, trust me, and is actually much better because if you need to add a new item to your menu, just change it in

mysite/menu/menu_data.js and they all change, since all menus use that file!


Kendra


Poster: pdof __at__ earthlink.net
Dated: Sunday October 9 2005 - 2:18:41 BST

Thank you, Kendra -- that did the trick! I think Steve's solution would have worked, too, if I could have set it up the way he did... I think I did something wrong.

BTW, Ruth -- thank you also for trying to help. As it turns out, the absolute path to the images DID work... I'm not sure why it did not the first time, but it made logical sense to me that it SHOULD work so I erased and rewrote that line of script and then the images worked! I must have missed (or mistyped) a character in there somewhere. Anyway, that was a good solution for the images, and since I'm not concerned about search engines, the extra code doesn't bother me.

I like Kendra's solution for having one menu that works on the root pages as well as subdirectory pages; my menu is nested inside a table cell and her solution worked perfectly on every page. It will be great to make updates to the menu and have it replicate across the site (200+pages already and growing!). Thanks again, Kendra, Steve and Ruth! :D