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: Thursday February 8 2018 - 06:02:56

More info needed about relative paths.

Poster: Rickstre
Dated: Friday November 19 2004 - 16:48:24 GMT

The structure of my site is

(root and libs are on the same level, but navbars is below libs)

The code in is:
<script type="text/javascript" src=""></script>
<param copyright="JavaScript Menu by Milonic -"></param>

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

The menu is called by index.php in "htdocs"

Portion of index.php:
if ($frames) {
.... No frames message
} else if (!$index) {

<script language="javascript">
top.location.href="'" ;
...........html code......
..........more HTML code....
"DOCUMENT_ROOT" above = '"

I also have tried prefixing the milonic_src.js, mmenuns4.js, and mmenudom.js files with all forms of:
and even... (though htdocs should not be necessary since this is root).

However, unless I place all files into the directory fron which a menu is called I get a JS error that indicates that the milonic_source.js file (and other js files) was not found pointing to the directory from which the script is run. Indeed if I place the three js files in the directories from which the script is run the menu works. However the relative path seems to be ignored.

I am NOT the original author of the site but now am charged with maintaining it. I cannot see how the line in index.php:
top.location.href="'" ;
is causing this problem. But perhaps a guru here can. However this seems to be needed for authentication of the site.

Anyone have a method that can be used to fix this problem? AAARRRAAAGGGHHHH! :!: :!:

BTW since the site on which this is located is password protected if you need the URL I will have to set up a temporary login and password.

Poster: Ruth
Dated: Tuesday November 30 2004 - 2:43:19 GMT

I think you might have to put up something for people to check and see what's happening, since no one has answered. Or you might need a new 'topic' heading to include something about the php coding and calling the menu not working and giving a js error. I'm sorry I can't help because I know nothing about php.


Poster: Rickstre
Dated: Tuesday November 30 2004 - 12:17:15 GMT

I found the problem last Friday... The Menu system is running on an Apache server. Apache treats the "libs" directory differently and does not allow external links directly to the "libs" directory. Moved everything to a new directory "common" and all is well!