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:31
Images aren't displayed in sub folders
Poster: webmaster
Dated: Monday September 26 2005 - 4:32:53 BST
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!
Poster: Ruth
Dated: Monday September 26 2005 - 20:41:27 BST
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
Poster: starmetheus
Dated: Monday September 26 2005 - 22:47:59 BST
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.
Poster: Ruth
Dated: Monday September 26 2005 - 23:39:54 BST
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
Hyperlinks have additional folder!
Poster: webmaster
Dated: Tuesday September 27 2005 - 5:28:39 BST
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.
Hyperlinks require ../ to work
Poster: webmaster
Dated: Tuesday September 27 2005 - 5:37:34 BST
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!