Child Folder doesn't display images or links properly

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:

Child Folder doesn't display images or links properly

Post by webmaster »

Hi Guys,

I have encountered another problem. It might be me, but I can't find the error. 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 lists the folder /Links/.... in front of each link. Very interesting

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/...
Cheers,

Steve Baltzois
(Director - Worlds Playground)
stuart
Advanced
Advanced
Posts: 14
Joined: Sat Aug 20, 2005 7:35 pm

Post by stuart »

Steve

I can't get to your script files so I can't be sure.

My understanding is (and I could be wrong) that the reference you place your page to the *.js file is like an include statement. So it's just like the the text in the *.js file were written in you web page.
Therefore the references to the image files (if you use relative style references e.g. images/myimage.gif) you are wanting will be relative to the web page.
On the pages in the sub directory the relative referrnce is not valid hence no image
I had a similar problem on my site and the only solution I could come up with was to explicitly reference the image files e.g.

Code: Select all

http://www.mysite/images/myimage.gif
If I'm completely wrong (or even partially) I hope someone will correct me as if there is a better solution I'd like to know.
In the mean time explicit referencing should get you up and running

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

Still not working!

Post by webmaster »

Thanks Stuart. I tried the absolute reference and I still have the same problem.

Not sure why you couldn't access the scripts. Try http://www.worldsplayground.com/TESTSIT ... nu_data.js

The other *.js files are in the same directory. Just change the file name to open them up.
Cheers,

Steve Baltzois
(Director - Worlds Playground)
pdof@earthlink.net
Beginner
Beginner
Posts: 4
Joined: Mon Oct 03, 2005 2:44 am
Location: Fayetteville, GA, USA

Images not appearing on child menus

Post by pdof@earthlink.net »

Steve,

Did you get a fix to this problem? I have EXACTLY the same issue, but I think the way you described it is much better than my description.

I read the one response to your post (using absolute URLs for the images) and I tried it, but that didn't work for me, either.

If you've found a solution, I'd love to hear it... please let me know by posting here (PM has been disabled).

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

Problem almost solved.

Post by webmaster »

I discovered that the problem is associated with child folders also known as sub folders. The scripts file doesn't appear to have the ability to reference data beyond one child folder. I didn't actually solve the problem itself, however found an alternative to make it work.

After many experiments with the menus and using a variety of parent menus, the only method that worked, was to convince the javascript that it was still in the home page. I did this by creating a sub folder underneath the sub folder and then copied and pasted the images and the "js" files into a 1 down sub folder in my website. It sounds complicated - but isn't really. Here is an example of what I mean.

[Home Page]
_|__|__|__|
_|__|__|__|_[Sub folder 1]
_|__|__|
_|__|__|_ [Sub folder 2]
_|__|
_|__|_[Sub folder 3]
_|
_|__[scripts folder] This is where the original js and images were located for all folders in my website.

The only method that worked was the following ...

[Home Page]
_|__|__|__|
_|__|__|__|_[Sub folder 1]
_|__|__|________|_[scripts folder for sub folder 1] A copy of the js files and image are pasted into this folder._
_|__|__|
_|__|__|
_|__|__|_ [Sub folder 2]
_|__|
_|__|_[Sub folder 3]
_|
_|__[scripts folder] This is STILL where the original js and images are for pages located in the home directory were located for all folders in my website.

The DHTML Menu is commendable and I absolutely recommend it to everyone. If total perfection existed - then people would be out of a job. Ruth, one of the administrators did tell me that she would bring the issue to the programmers as this small error shouldn't occur though.

Hope that helps. If not, send me a private email and I will send you an example of how I set up our website.
Cheers,

Steve Baltzois
(Director - Worlds Playground)
User avatar
kendra
Advanced
Advanced
Posts: 24
Joined: Wed Sep 28, 2005 5:55 am

Post by kendra »

Dude you need to format your page, it runs all off the screen and the tables are really messed up, when you set your font size to smallest its okay but most ppl dont have that, on the default its bad the text is totally looks wrong, the menu breaks on large.

Also your menu does the same thing, I think you need to use styles for your text and menus and fix that :roll: If you need help just ask, it really can make a difference, and make a great look professional.
webmaster
Advanced
Advanced
Posts: 16
Joined: Mon Sep 19, 2005 12:13 pm
Location: Australia
Contact:

Post by webmaster »

Thank you for you input, however, when I checked it this morning, I have not encountered the problems you claim. Could you give me the exact URL where it occurs so that I can see the problems and correct them.

The website does use CSS. Out of curiousity what screen resolution are you using?
Cheers,

Steve Baltzois
(Director - Worlds Playground)
Post Reply