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: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:12

INSTALL: Placing all menu files in a separate directory


Poster: gordr
Dated: Saturday March 4 2006 - 21:42:03 GMT

I'm considering licensing a Milonic menu for a webpage I'm building. I downloaded the menu, read all the the instructions, and proceeded as directed in the INSTALL.txt file that came with the download.

As sanctioned by Step #2 in the INSTALL instructions (see below), I decided to keep all files associated with the Milonic menu (.js, .gif, etc.) in a separate sub-directory of my root directory -- one I named menuCode. In other words, the webpage that embeds the menu code is in the root directory, but all menu files are in a subdirectory named menuCode

As per the instructions in Step #2 below, I prefixed the four .js filenames in the Step #3 code below with the correct directory name, i.e., menuCode/milonic_src.js, etc. NO LUCK! The menu didn't display. Instead, I saw a very different milonic.com menu at the top of the page -- not the menu I downloaded.

I then got rid of the menuCode sub-directory and placed all menu files in the root directory instead, the same location as the webpage embedding the menu. NOW EVERYTHING WORKED FINE!

What am I doing wrong? Did I misinterpret the instructions in Step #2 below? What do I need to change if I use a menuCode sub-directory as a container for my menu files?

Many thanks,

gord
ps: I don't think this should make any difference, but I haven't uploaded any files to my webserver. I'm building & testing webpage & menu locally (using DreamWeaver & Safari).

-------- HERE ARE THE RELEVANT INSTRUCTIONS FROM INSTALL.TXT ---

2. Copy the files mmenudom.js, mmenuns4.js, milonic_src.js and menu_data.js
to your web server. You can put these in a directory if you like but you
will need to add details of your directory to the code in section 3 below.

3. Inform your web pages that you want the menu to appear when they are loaded.
To do this, you need to add the following JavaScript tags to your HTML page:


<script type="text/javascript" src="milonic_src.js"></script>
<div class=milonic><a href="http://www.milonic.com/">JavaScript Menu, DHTML Menu Powered By Milonic</a></div>
<script type="text/javascript">
if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>");
</script>
<script type="text/javascript" src="menu_data.js"></script>


Poster: Migru
Dated: Sunday March 5 2006 - 0:18:07 GMT

Hi

yes, you can use a folder for all your menu-related files, calling it "menucode" or "js" or "menu", as many users do. Why it did not work, difficult to say, as there is no url given, to study. So there might have been something different in your setup, which caused it not to work as expected.
In your case, web pages which start from the root could have the path set "menucode/filename.js" (and there are at least four relevant path settings for the javaScript files) If you have pages starting from a folder one level down they should have all paths set ../menucode/filename.js accordingly. etc.
This works in exactly that way in my PC (Windows, locally) too as well as when I´ve uploaded everything to the webserver. There of course, in a unix environment, I have always to consider that it is distinguished strictly between upper and lower case, when I´m introducing names for folders and files. So in my opinion lower case is always recommended for both environments, to be on the safe side.
Michael


Poster: John
Dated: Tuesday March 7 2006 - 15:15:31 GMT

If your /menuCode/ directory is at the root level of your server (probably is), you need to add a / at the beginning; i.e., /menuCode/milonic_src.js. etc. This will force the system to start looking for that directory from the root level, rather than from the directory level the the call is in.