Ok, I'm relatively new to the 5 version, was using 3.0 So how do I make all the webpages call just one single menu array? Is there a global command of some sort? So I've basically taken the sample and changed the words and pointers so far. Added the little bit code to my main index page and that's where I am. Any help would be much appreciated.
Thanks,
Matt
One menu for all????
- Matt Stano
- Beginner
- Posts: 9
- Joined: Wed Aug 31, 2005 9:15 pm
- Location: Hampton, NH
One menu for all????
-------------------------------
"Outside a dog, a book is man's best friend.
Inside a dog, it's too dark to read."
~Groucho Marx~
Matthew Stano
"Outside a dog, a book is man's best friend.
Inside a dog, it's too dark to read."
~Groucho Marx~
Matthew Stano
- Matt Stano
- Beginner
- Posts: 9
- Joined: Wed Aug 31, 2005 9:15 pm
- Location: Hampton, NH
One menu for all????
Hi Ruth, thanks for the reply. I'm coming from the old 3.3 version of DHTML so I'm having a little trouble in translation. Here's what happens:
I have (in my mind) a fairly simple folder layout where individual pages are located; ie:
-root
--tech
---newsletters
---videos
--calendars
---building
---foodservice
well you get the idea...
So my issue is that on the top level the navigation from DHTML works great, but when I go to a page, in say the, root\tech\newletters folder and then jump to root\calendars\building I have an issue with my path. The navigation once I'm deep in the folder structure needs to be adjusted to ..\..\calendars\building. So I wind up having multiple menu scripts. What is the simpliest way to make this work for me so I don't need to have more than one menu script? Is it possible? Thanks for your help.
Matt
I have (in my mind) a fairly simple folder layout where individual pages are located; ie:
-root
--tech
---newsletters
---videos
--calendars
---building
---foodservice
well you get the idea...
So my issue is that on the top level the navigation from DHTML works great, but when I go to a page, in say the, root\tech\newletters folder and then jump to root\calendars\building I have an issue with my path. The navigation once I'm deep in the folder structure needs to be adjusted to ..\..\calendars\building. So I wind up having multiple menu scripts. What is the simpliest way to make this work for me so I don't need to have more than one menu script? Is it possible? Thanks for your help.
Matt
-------------------------------
"Outside a dog, a book is man's best friend.
Inside a dog, it's too dark to read."
~Groucho Marx~
Matthew Stano
"Outside a dog, a book is man's best friend.
Inside a dog, it's too dark to read."
~Groucho Marx~
Matthew Stano
I call my menu code files with an include like this...
The leading / in the path means the call is server-relative, so regardless of the level from which the call is made the files will always be found. My _data files, being different for each of the 25 or so sites I handle, are included on the individual pages in a td.
BTW, your '..\..\calendars\building' should be ../../calendars/building, etc., but don't get into that kind of addressing. It's much too restrictive.
Code: Select all
<script language="javascript" src="/sa/menu5/milonic_src.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
<!--
if(ns4)_d.write("<scr"+"ipt language=javascript src=/sa/menu5/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=javascript src=/sa/menu5/mmenudom.js><\/scr"+"ipt>");
-->
</script>
BTW, your '..\..\calendars\building' should be ../../calendars/building, etc., but don't get into that kind of addressing. It's much too restrictive.
John
- Matt Stano
- Beginner
- Posts: 9
- Joined: Wed Aug 31, 2005 9:15 pm
- Location: Hampton, NH
One menu for all????
Hi John, thanks. So let me get this part straight. You have individual menu_data.js files for each page?
here is the code from my main page:
<script type="text/javascript" src="java2/milonic_src.js"></script>
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=java2/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt type=text/javascript src=java2/mmenudom.js><\/scr"+"ipt>");
</script>
<script type="text/javascript" src="java2/menu_data.js"></script>
It looks like yours, maybe I'm missing something. You said that the menu_data are on the individual pages in a table. Are these menu structures altered to account for being deeper in the folder structure?
and lastly you said:
"../../calendars/building, etc., but don't get into that kind of addressing. It's much too restrictive."
Ok, I give, what other way would you address it? I'm kind of a newbie to the java side of things. Is there really an easier way?
Thanks for your guidance.
Matt
here is the code from my main page:
<script type="text/javascript" src="java2/milonic_src.js"></script>
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=java2/mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt type=text/javascript src=java2/mmenudom.js><\/scr"+"ipt>");
</script>
<script type="text/javascript" src="java2/menu_data.js"></script>
It looks like yours, maybe I'm missing something. You said that the menu_data are on the individual pages in a table. Are these menu structures altered to account for being deeper in the folder structure?
and lastly you said:
"../../calendars/building, etc., but don't get into that kind of addressing. It's much too restrictive."
Ok, I give, what other way would you address it? I'm kind of a newbie to the java side of things. Is there really an easier way?
Thanks for your guidance.
Matt
-------------------------------
"Outside a dog, a book is man's best friend.
Inside a dog, it's too dark to read."
~Groucho Marx~
Matthew Stano
"Outside a dog, a book is man's best friend.
Inside a dog, it's too dark to read."
~Groucho Marx~
Matthew Stano
Hi,
I think what John meant [boy I hate paths] is that the having the / in front of the sa folder name says that the file is in
I gave up and I just use darned full paths....
Ruth
I think what John meant [boy I hate paths] is that the
Code: Select all
"/sa/menu5/milonic_src.js"
Code: Select all
"rootdirectory/sa/menu5/milonic_src.js"
Ruth
Ruth is correct. The leading / starts the search from the root level of my server, regardless of what 'level' I might be on in the menu structure (or any other, for that matter). In this case, my full path is http://www.west.asu.edu/sa/menu5/milonic_src.js, but why type all that every time?
This is especially handy for those times you might move a file to another directory or 'level'. Doesn't matter where you put the file, /sa/menu5/milonic_src.js will always start at the root and find this file, regardless. No more ../../ junk.
This is especially handy for those times you might move a file to another directory or 'level'. Doesn't matter where you put the file, /sa/menu5/milonic_src.js will always start at the root and find this file, regardless. No more ../../ junk.
John
- Matt Stano
- Beginner
- Posts: 9
- Joined: Wed Aug 31, 2005 9:15 pm
- Location: Hampton, NH
One menu for all????
Hi John and Ruth,
So I did a lot work and figured out what you guys were telling me. I posted on the server and the pathing began to work as you described. Which is fantastic!! Thanks a bunch. Just one little sticky point. Inside the menu_data.js there is a line for the menu image, a down arrow for me. When I've moved to a page that is deeper in the folder structure I don't see the image anymore. I'm not changing the menu_data.js file. Is there something I need to do there that will fix it?
Thanks again for all your help.
Matt
So I did a lot work and figured out what you guys were telling me. I posted on the server and the pathing began to work as you described. Which is fantastic!! Thanks a bunch. Just one little sticky point. Inside the menu_data.js there is a line for the menu image, a down arrow for me. When I've moved to a page that is deeper in the folder structure I don't see the image anymore. I'm not changing the menu_data.js file. Is there something I need to do there that will fix it?
Thanks again for all your help.
Matt
-------------------------------
"Outside a dog, a book is man's best friend.
Inside a dog, it's too dark to read."
~Groucho Marx~
Matthew Stano
"Outside a dog, a book is man's best friend.
Inside a dog, it's too dark to read."
~Groucho Marx~
Matthew Stano
- Matt Stano
- Beginner
- Posts: 9
- Joined: Wed Aug 31, 2005 9:15 pm
- Location: Hampton, NH
One menu for all????
Ok, I figured it out. I just went back to the menu_data.js file and where it asks me for:
subimage="java2/arrowdn.gif";
I added the forward slash to make it a universal path. So now it reads:
subimage="/java2/arrowdn.gif";
Alright, I feel better for figuring that one out.
Thanks.
subimage="java2/arrowdn.gif";
I added the forward slash to make it a universal path. So now it reads:
subimage="/java2/arrowdn.gif";
Alright, I feel better for figuring that one out.
Thanks.
-------------------------------
"Outside a dog, a book is man's best friend.
Inside a dog, it's too dark to read."
~Groucho Marx~
Matthew Stano
"Outside a dog, a book is man's best friend.
Inside a dog, it's too dark to read."
~Groucho Marx~
Matthew Stano