Nav images show in the root files but not in sub directorys?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
jm
Advanced
Advanced
Posts: 18
Joined: Tue Jul 27, 2004 1:55 pm

Nav images show in the root files but not in sub directorys?

Post by jm »

Hi

This is driving me nuts !
Used Milonic nav before - no problems at all.

However - I've got the script working fine in the root (index.html)
however when you click through to a subdirectory (/products/index.html) the images appear broken, though the actual script works (the drop downs are just basic text)

Here's the homepage code
<script type="text/javascript" src="milonic/milonic_src.js"></script>
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=milonic/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt type=text/javascript src=milonic/mmenudom.js><\/scr"+"ipt>");
</script>

Here's the sub directory page code
<script type="text/javascript" src="../milonic/milonic_src.js"></script>
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=../milonic/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt type=text/javascript src=../milonic/mmenudom.js><\/scr"+"ipt>");
</script>


here's the line from menu_data.js
aI("showmenu=products;image=images/nav/products.gif;overimage=images/nav/products.gif;;url=http://menusample83.php;")

i've tried using
../images
and /images

this is something really simple and I've gone blind to it !
slackbladder
Super Advanced
Super Advanced
Posts: 72
Joined: Fri Jul 01, 2005 3:04 pm

Post by slackbladder »

try:

Code: Select all

aI("showmenu=products;image=/images/nav/products.gif;overimage=/images/nav/products.gif;;url=http://menusample83.php;")
if the folder images is in root.
slackbladder
Super Advanced
Super Advanced
Posts: 72
Joined: Fri Jul 01, 2005 3:04 pm

Post by slackbladder »

:oops: Sry just read you had done that! DOH! (it's been a long day! :( )

Give us a URL so we can see the problem.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

It is a path issue, and to see we need a url as Slack noted.

Paths are not my thing, but you seem to be saying that the images are in
root/images/ so if you go to the products folder and use /images/whateverimage.gif the menu would expect to have an images folder under the products folder. [I think :? ] If all else fails, you can do what I do, put in the full path :D

Ruth
jm
Advanced
Advanced
Posts: 18
Joined: Tue Jul 27, 2004 1:55 pm

Post by jm »

Ruth wrote:Hi,

It is a path issue, and to see we need a url as Slack noted.

Paths are not my thing, but you seem to be saying that the images are in
root/images/ so if you go to the products folder and use /images/whateverimage.gif the menu would expect to have an images folder under the products folder. [I think :? ] If all else fails, you can do what I do, put in the full path :D

Ruth
yep - tried that
only way around it is to use a full path or I'm going to move the navigation to the root and call it into every page from there
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Well, at least the full path works, until you change domains! Then you have a lot of page updating to do....

But, I think it must be something else because I just tested it on my site and I'm not having a problem using relative paths [which I figured out after having posted the previous message which is wrong on paths :oops:

Unfortunately without some kind of url, test page with the menu we can't test things.


Ruth
jm
Advanced
Advanced
Posts: 18
Joined: Tue Jul 27, 2004 1:55 pm

Post by jm »

Hey Ruth

Yep it's odd - what i've done is create a menu_data2.js file which contains ../images and that works fine

decided against the use of a php include - as I was unsure whether that would effect search engine ranking - ie the pages effectively would only have a serverside include for the navigation and not sure if robots can pick that up !


Ruth wrote:Well, at least the full path works, until you change domains! Then you have a lot of page updating to do....

But, I think it must be something else because I just tested it on my site and I'm not having a problem using relative paths [which I figured out after having posted the previous message which is wrong on paths :oops:

Unfortunately without some kind of url, test page with the menu we can't test things.


Ruth
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

I dont' think there is a problem. They read the 'resulting' page, the returned page, they don't know how it got there, the ssi stuff happens on the server which they don't see. Go to the page and then view source, that is what the search engine sees. For example, if you have

Code: Select all

<!--# include file="mainnav.php" --> 
the search engine never sees that, it sees the actual mainnav.php page that has been included.

As to the menu, that's a js file, the search engines can't read that. You might take a look at this about Milonic and Search Engines. I think they won't read links in noscript tags, but they do read content in divs so you could actually create a div, set it to be hidden and put text links in it for the search engines. Pretty sure that will work fine. And, that shouldn't take up space

Ruth
Post Reply