http://www.sitename.com
.....htdocs
........root
........libs
..........navbars
.............menu.inc.php
(root and libs are on the same level, but navbars is below libs)
The code in menu.inc.php is:
The menu is called by index.php in "htdocs"<script type="text/javascript" src="http://www.sitename.com/libs/navbars/mi ... "></script>
<param copyright="JavaScript Menu by Milonic - http://milonic.com"></param>
<script type="text/javascript">
<!--
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=http://www.sitename.com/libs/navbars/mm ... /scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=http://www.sitename.com/libs/navbars/mm ... /scr"+"ipt>");
-->
</script>
type=text/javascript></SCRIPT>
?>
</head>
<body>
<script language=javascript>
<?
include("$DOCUMENT_ROOT/libs/navbars/menu_data.js.php");
?>
</script>
Portion of index.php:
"DOCUMENT_ROOT" above = 'http://www.sitename.com"<?
if ($frames) {
?>
<html>
<head>
<title>pagename</title>
</head>
.
.... No frames message
.
} else if (!$index) {
?>
<script language="javascript">
<!--
top.location.href='http://www.sitename.com/root/index.php?frames=true';
//-->
</script>
<?
exit;
}
?>
...........html code......
<?
require("$DOCUMENT_ROOT/libs/navbars/menu.inc.php");
?>
..........more HTML code....
I also have tried prefixing the milonic_src.js, mmenuns4.js, and mmenudom.js files with all forms of:
http://www.sitename.com/libs/navbars/
/libs/navbars/
/navbars/
and even...http://www.sitename.com/htdocs/libs/navbars/ (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:
is causing this problem. But perhaps a guru here can. However this seems to be needed for authentication of the site.top.location.href='http://www.sitename.com/rot/index.php?frames=true';
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.