Images in menus

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
JACKO306
Beginner
Beginner
Posts: 4
Joined: Tue Aug 06, 2002 12:40 pm

Images in menus

Post by JACKO306 »

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.

:(
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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

<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.
John
JACKO306
Beginner
Beginner
Posts: 4
Joined: Tue Aug 06, 2002 12:40 pm

Still No Luck

Post by JACKO306 »

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

Post by John »

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.
John
JACKO306
Beginner
Beginner
Posts: 4
Joined: Tue Aug 06, 2002 12:40 pm

Thanks, but still got the same problem

Post by JACKO306 »

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

Post by John »

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 :?:
John
JACKO306
Beginner
Beginner
Posts: 4
Joined: Tue Aug 06, 2002 12:40 pm

Thanks

Post by JACKO306 »

Great that seems to work, i am sure i tried it before ! :D
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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