Links to menu from other folders and links within menu.

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
ghis
Beginner
Beginner
Posts: 9
Joined: Sun Dec 24, 2006 7:10 pm

Links to menu from other folders and links within menu.

Post by ghis »


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
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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.
John
ghis
Beginner
Beginner
Posts: 9
Joined: Sun Dec 24, 2006 7:10 pm

Post by ghis »

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
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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: Select all

<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>
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.

viewtopic. ... 5332#35332

viewtopic. ... 8775#38775

Ruth
Post Reply