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: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Wednesday July 18 2012 - 06:07:28

Images in menus


Poster: JACKO306
Dated: Tuesday August 6 2002 - 12:46:04 BST

For each web page i load the menus using the following

<SCRIPT language=JavaScript src="../menu/menu_array.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="../menu/mmenu.js" type=text/javascript></SCRIPT>

Unfortunatly for all web pages that are not in the root the images on the menus are not show. Is there a way around this or is there a better way of putting the menu on all pages of the website.

:(


Poster: John
Dated: Tuesday August 6 2002 - 15:02:17 BST

Initially ran into somewhat the same problem with mine except I'm not using graphics. Pages that were buried couldn't find the scripts. Now I have the scripts at my site root level and simply call the scripts to refer to the root like this...

Code:
<script language="Javascript" src="/sa/cspc/menu_arraysteps.js" type="text/javascript"></script>
<script language="Javascript" src="/sa/cspc/mmenu.js" type="text/javascript"></script>


This way no matter what level the page is at it will still find the scripts using exactly the same call.

Still No Luck


Poster: JACKO306
Dated: Tuesday August 6 2002 - 17:27:52 BST

I copied all the images and scripts to the root, changed the references in the pages but i still dont get the images on the menus. :(


Poster: John
Dated: Tuesday August 6 2002 - 17:35:45 BST

The images can be anywhere because they are called by the script and since their reference is also absolute (sort of) it doesn't matter where they are. Mine are all in /images/ within the directory I'm working with. Check my array at http://westcgi.west.asu.edu/sai/templat ... _array.cfm to see the whole mess. Save it to disk rather than trying to view it directly.

Thanks, but still got the same problem


Poster: JACKO306
Dated: Tuesday August 6 2002 - 18:41:18 BST

Thanks for that, i can see your code but the images are on the items on the sub menus, see the below example the google_icon.gif is only visible when in root web pages, the only way i have found around it is to put in the complete web address such as http://www.test.com/menu/google_icon.gif.

,"<img src=google_icon.gif border=0>&nbsp;Google.com", "http://www.google.com target=Search",,,1

Is there any way around this.


Poster: John
Dated: Tuesday August 6 2002 - 18:54:14 BST

Sorry 'bout that - misunderstood the problem.

However, I would think you could use the same method I did to call your images. Once you're on a page the server should have the base in mind (e.g., http://www.test.com), so you should be able to go from there with something like ,"<img src=/images/google_icon.gif..., etc. (assuming you plopped all your images in /images/ at the top level, of course).

Make any more sense this way :?:

Thanks


Poster: JACKO306
Dated: Wednesday August 7 2002 - 9:55:57 BST

Great that seems to work, i am sure i tried it before ! :D


Poster: John
Dated: Wednesday August 7 2002 - 14:56:33 BST

Great! That'll be $2, please... :D