Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:42

Subdirectories


Poster: Randy
Dated: Wednesday September 25 2002 - 18:21:08 BST

I am reviewing this menu and it is truly awesome.

However I have a question...

I have subdirectories such as:
Recipes
News
Files
Includes
Images
JS
Calendar

All the menu files and would be located in the Includes directory in a file called: HEADER (to include the two JS files)

Now the menu I am trying to get to work would be visiable across all directories.

So if you were viewing the INDEX file in the NEWS directory, there would be a call to the INCLUDES directory to obtain the HEADER file which basically does the layout of the page along with the menu. At the end of the INDEX file is a call to the FOOTER page which is also in the INCLUDES directory.

The menu does not work unless it is called from the same directory.

:?: Is this how it works? Can this be used with Subdirectories?

Thanks in Advance! 8) :idea: :?:


Poster: John
Dated: Wednesday September 25 2002 - 20:11:07 BST

I use includes all over the place on a lot of my pages. See http://westcgi.west.asu.edu/sai/ as an example. These are ColdFusion pages, but that shouldn't matter.

I call the menu scripts with
Code:
<cfinclude template="/sai/templates/Nav_Standard.cfm">
which is nothing more than
Code:
<script language="JavaScript" src="/sai/templates/menu_array.cfm" type="text/javascript"></script>
<script language="JavaScript" src="/sai/templates/mmenu.js" type="text/javascript"></script>

Headers, footers, and css are also called in the same way. Since I have a number of sub- and sub-sub-directories and they all call to the same location (/sai/templates/), you can see that it does work.


Poster: Randy
Dated: Thursday September 26 2002 - 18:42:44 BST

Well I am using CF and have a directory setup as such:

Client / Secure
Client / Secure / Members
Client / Secure / Includes

Within the INCLUDES directory I have the files:
Header.cfm
Footer.cfm
mmenu_array.js
mmenu.js

In the Client / Secure / Members directory I have a file called INDEX.CFM


Example of the INDEX.CFM
<cfinclude template="../includes/header.cfm">
::Blah::
::Blah::
<SCRIPT language=JavaScript src="../includes/mmenu_array.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="../includes/mmenu.js" type=text/javascript></SCRIPT>

::Blah::
::Blah::
<cfinclude template="../includes/footer.cfm">

And I get the Header, MAIN Page, Footer, but no MENU.

Ideas?


Poster: John
Dated: Thursday September 26 2002 - 22:27:44 BST

Ideas? Yep.

Don't use the relative addressing (../xxx/yyy/, etc). Note in my examples I pick up from where the implied base leaves off. For instance, /sai/templates/mmenu.js, etc. I think that will make the difference.