Images aren't displayed in sub folders

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
webmaster
Advanced
Advanced
Posts: 16
Joined: Mon Sep 19, 2005 12:13 pm
Location: Australia
Contact:

Images aren't displayed in sub folders

Post by webmaster »

The *.js files work perfectly when they are run in the home directory. Once I add webpages into a child (sub) directory and change the script to "../scripts/menu_data.js" the images don't appear on that particular page.

Also I noticed that the hyperlink to each item in the child folder lists the folder "/Links/".... in front of each link. Very interesting. For instance a page link to http://www.worldsplayground.com/first_aid.htm now looks like http://www.worldsplayground.com/Links/first_aid.htm

Your help would be much appreciated, like always.

You can find the page I am talking about at
http://www.worldsplayground.com/TESTSIT ... puters.htm

The pages in the home directory that do work can be found at
http://www.worldsplayground.com/TESTSITE/index.htm

and finally the scripts can be found at
http://www.worldsplayground.com/TESTSITE/scripts/... (just change the ... to the js file you need (i.e. menu_data.js etc...)

Stuart did reply to another topic of mine about absolute references, however I tried that and it still didn't work!
Cheers,

Steve Baltzois
(Director - Worlds Playground)
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

I am terrible at paths, but it seems even your full path is not working. I have no idea what's going on. In the one you have that starts with images have you tried that with a / in front of images? Sorry, I can't be more help. I will report this.

Ruth
starmetheus
Advanced
Advanced
Posts: 11
Joined: Wed Oct 13, 2004 11:03 pm

Post by starmetheus »

Good guess Ruth ;)

I believe that adding the / in front of images should take care of the problem.

example:
overbgimage="images/Dhtml_Menu/backon_beige.gif";

change to...

overbgimage="/TESTSITE/images/Dhtml_Menu/backon_beige.gif";

In this case the path needs the /TESTSITE/, but when the files are moved out of the TESTSITE folder, the path would need to be changed to:

overbgimage="/images/Dhtml_Menu/backon_beige.gif";

I think that will work, and hopefully it made sense.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Yes, it did. I just can't figure out why the one image that has the full path doesn't work? That makes no sense, the image is at that url as copy and paste the url gets the image, so it should work in the data file. Really strange. It's almost as if they don't want to work unless they are in the root or maybe with the scripts.

Ruth
webmaster
Advanced
Advanced
Posts: 16
Joined: Mon Sep 19, 2005 12:13 pm
Location: Australia
Contact:

Hyperlinks have additional folder!

Post by webmaster »

Thanks guys. I fixed the problem with the images. I simply recreated the menu_data.js file and placed them and the images into a child folder of my Links Folder.

That is all great and works fine now, however I still can't seem to fix the error with the hyperlinks of each URL in the menu. For some bizarre reason each hyperlink reference now contains the folder Links/ in it.

For example the hyperlink reference to go to our "about us" page should be http://www.worldsplayground.com/TESTSITE/about_us.htm instead the link now shows http://www.worldsplayground.com/TESTSIT ... out_us.htm . The links part should not be there, but appears there for no apparent reason. Of course this page doesn't exist so customers get a white screen. I have tried absolute referencing and it doesn't work.

On my main page under the TESTSITE folder, the hyperlinks work perfectly. If you need to see what I mean go to http://www.worldsplayground.com/TESTSITE/index.htm

Help, help.
Cheers,

Steve Baltzois
(Director - Worlds Playground)
webmaster
Advanced
Advanced
Posts: 16
Joined: Mon Sep 19, 2005 12:13 pm
Location: Australia
Contact:

Hyperlinks require ../ to work

Post by webmaster »

Hi guys,

I have worked out why my hyperlinks add /Links/... to each hyperlink reference. Simply because each hyperlink did not have the correct reference. I need to place ../ in front of each reference for it to work.

Don't worry about replying. I feel like a dodo. Ah well I am glad I was able to work out my own problem though.

Ruth, let me know if you do find out why the images wouldn't work if they are in the root directory.

Cheers!
Cheers,

Steve Baltzois
(Director - Worlds Playground)
Post Reply