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:41
Links to menu from other folders and links within menu.
Poster: ghis
Dated: Friday February 9 2007 - 18:25:50 GMT
Hi there,
I am having problems in properly calling the menu from other pages that are located in other folders different from the index.htm one.
I manage to link the menu itself for instance using:
<SCRIPT language=JavaScript src="../milonic_src.js" type=text/javascript></SCRIPT>
instead of:
<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
But then all images in the menu are not found. One example is the arrow image that is called using:
subimage="arrow_white.gif";
or other images used as links:
aI("imagealign=center;imagepadding=5;image=image.jpg;url=http://www.example.example;");
How do I need to set up these links in the menu?! Or do I need to call the menu in a different way?
Thank you for your help.
Best regards
Giuseppe
Poster: Ruth
Dated: Friday February 9 2007 - 22:17:23 GMT
Hi,
You might try a full path.
Other than that unless you can give us a url with the pages and menus we couldn't be more specific since we have no idea what your layout is, where your menu is, where your images are, where your pages are.
Ruth
Poster: John
Dated: Friday February 9 2007 - 22:24:44 GMT
Best bet is server-relative addressing. Don't get caught up in the ../../ nonsense!
If you need a further explanation of that, just let us know. There are already a number of posts on it, which can be found with the Search item.
Poster: ghis
Dated: Sunday February 11 2007 - 19:33:30 GMT
I have tried the full path but it didnt work. I just wonder how is everybody else managing this? putting all the webpages in the same folders? Anyway, here is the site (just started building it):
http://www.wunderkammern.net/
the only working link of the manu is INSTALLAZIONI / 2002 / PASQUALE ALTIERI
it can be reached at:
http://www.wunderkammern.net/altieri/altieri.htm
As you can see, from this latter page I'm calling a different menu where the links have ../../ etc.
I would be really interested in learning how to use the server-relative addressing. Where can i find more info?
Thank you for your help.
Giuseppe
Poster: Ruth
Dated: Sunday February 11 2007 - 21:34:13 GMT
Hi,
With the disclaimer that I use full paths.... why not set up your site
root directory [wunderkammern]
sub directory [menu]
Then put all your menu related files, the milonic_src.js, mmenuns4.js, mmenudom.js, wunder_menu.js and all your menu images in that folder. Then you should be able to just code in the image names in the data file, allowing you to only have to have one data file for all pages. The calls for the menu files should be
Code:
<SCRIPT language=JavaScript src="/menu/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/menu/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=/menu/mmenudom.js><\/scr"+"ipt>"); </script>
<SCRIPT language=JavaScript src="/menu/wunder_menu.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/menu/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=/menu/mmenudom.js><\/scr"+"ipt>"); </script>
<SCRIPT language=JavaScript src="/menu/wunder_menu.js" type=text/javascript></SCRIPT>
The / it should tell the browser to look in your root directory wunderkammern for a sub folder called menu for the files. I think. Paths are the bain of my existence, it's why I use full...
Here are a couple of links to posts on paths. You could try a search using paths and see what else you find.
http://www.milonic.com/forum/viewtopic. ... 5332#35332
http://www.milonic.com/forum/viewtopic. ... 8775#38775
Ruth