aaakkk!!! can't get the script to work on more than one page

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
serenity
Beginner
Beginner
Posts: 5
Joined: Wed Oct 01, 2003 4:07 am

aaakkk!!! can't get the script to work on more than one page

Post by serenity »

First of all. I have downloaded at least a thousand menue scripts some completely free some trail versions none of them worked as well , were as easy to customise, or were as nice as yours. Thank you so much!!!.

ok now I am using Frontpage for an HTML editor and I can get this and a few other scripts to work on more than one page. I have done all of the trouble shooting and have the one working page live at http://www.serenitymoon.com/index.htm any suggestions on how to get the other pages to work with the same script or do I need a new script????? :oops:
serenity
Beginner
Beginner
Posts: 5
Joined: Wed Oct 01, 2003 4:07 am

Post by serenity »

Sorry I mean that I can not get this script to work on more than one page. :(
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Check your path, if all files are in one location and your url is
serenitymoon.com/

"/milonic_src.js"
"/tmenu_data.js"
or
"/menu_folder/milonic_src.js"


<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="tmenu_data.js" type=text/javascript></SCRIPT>

(We're you're means we-are and you-are, try We're your ;)
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Maz is correct (and beat me to it - was in the middle of a post to you and got a long phone call).

The way you have your code assumes that all your site pages are at the same level (i.e., in the same directory as your home page). They are not, and in fact you have several different directories for your pages. That's fine, but not for your coding.

As she suggested, I would put all your menu files in one directory by themselves. Maz put /menu_files/. You can call it anything you like, of course. Using this example, your code would look like this...

Code: Select all

<SCRIPT language=JavaScript src="/menu_files/milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=/menu_files/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=/menu_files/mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="/menu_files/tmenu_data.js" type=text/javascript></SCRIPT>
This code can go on any page and will work properly.
John
Post Reply