menu sorted (mostly)

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
sjp1966
Advanced
Advanced
Posts: 15
Joined: Mon Jul 26, 2004 9:41 pm

menu sorted (mostly)

Post by sjp1966 »

Thanks to some really great help from this forum my new menu is almost up and running, there only seems to be one thing im having a problem with

on my main page at http://homepage.ntlworld.com/steve.peto/movies/dvd.html the menu appears at the top fine, however the page is supposed to appear at the top of all the pages that are to do with DVDs.

so for example, you may go to dvd movies>dvd have>0-9>8 mile and there shold be a menu at the top.

the only thing i can thin kof is that there is an extra directory, which i have put in bold above and that me be affecting the way the menu displays

can someone please advise
Steve P
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

That's exactly the problem. Your JS calls are wrong. You have...

Code: Select all

<script language=JavaScript src="../movies/milonic_src.js" type=text/javascript></script>	
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=../movies/mmenuns4.js><\/scr"+"ipt>");		
else _d.write("<scr"+"ipt language=JavaScript src=../movies/mmenudom.js><\/scr"+"ipt>"); 
</script>
<script language=JavaScript src="../movies/menu_data.js" type=text/javascript></script>
This is relative addressing - relative to where I am now in the site. When you throw an extra directory in there, /movies/ is no longer one directory up, as you are saying above.

You need server-relative addressing; i.e., always start looking for my directory from the root level, regardless of where I am in the site...

Code: Select all

<scriptlanguage="Javascript" src="/steve.peto/movies/milonic_src.js" type="text/javascript"></script>	
<script language="Javascript">
if(ns4)_d.write("<scr"+"ipt language=Javascript src=/steve.peto/movies/mmenuns4.js><\/scr"+"ipt>");		
else _d.write("<scr"+"ipt language=Javascript src=/steve.peto/movies/mmenudom.js><\/scr"+"ipt>"); 
</script>
<script language="Javascript" src="/steve.peto/movies/menu_data.js" type="text/javascript"></script>
John
sjp1966
Advanced
Advanced
Posts: 15
Joined: Mon Jul 26, 2004 9:41 pm

Post by sjp1966 »

ive tried the /steve.peto/movies/** and i dont get any menu at all. if i have it set as ../movies/** i get menus on the pages which are in the same directory as the 4 java files.

the film files are in another directory and i cant see the menus in them at all, although in dreamweaver i get the 3 yellow icons to indicate javascript in coded on the page

for example, the pages that do have a menu showing are
root
movies
dvd.html & dvd_have.html and dvd_want.html. the 4 JS files are also in this directory

the individual movie pages are at
root
movies
dvd_have
and these do not have the menu
Steve P
sjp1966
Advanced
Advanced
Posts: 15
Joined: Mon Jul 26, 2004 9:41 pm

Post by sjp1966 »

curious, although they do seem to be there when i upload them which is curious as i used to be able to see them by pressign f12 in dreamweaver, although that no longer happens except in the template page.

Hmmm, any reason for this ?

Steve
Steve P
Post Reply