Hi,
I found a great menu, but encountering a probelm when trying to In order to use the menu, I have to include the javascript file from each page on my website (unless I misunderstood):
<script language="JavaScript" src="menu.js"></script>
and some other js files as well.
But when I insert it to another page, as is, it does not work as the path is different (for example
age is located in sub directory), so IT SHOULD BE:
<script language="JavaScript" src="../menu.js"></script>
etc.
Is this how menus usually work?
The paths have to be changed for each page?
Also, In the menu.js file itself, which is the file that contains the menu, there is the list of the items:
var MENU_ITEMS =[
["item1", "Home",
["sub-item1", "aaa.htm"],
["sub-item2", "bbb.htm"],
["sub-item3", "ccc.htm"]]
etc.
It works for one page, but when this file is included in another page, which is locatd in antother directory,it does not work, as the page that calls it is located somewhere else, and the paths should be changed,
as if it should be:
var MENU_ITEMS =[
["item1", "../Home",
["sub-item1", "../aaa.htm"],
["sub-item2", "../bbb.htm"],
["sub-item3", "../ccc.htm"]]
etc.
I am sure it should not work this way and that I have missed something big.
Can someone pls help out, toexplain the concept of menus, without using frames?
Thanks
I found a great menu, but encountering a probelm when trying to In order to use the menu, I have to include the javascript file from each page on my website (unless I misunderstood):
<script language="JavaScript" src="menu.js"></script>
and some other js files as well.
But when I insert it to another page, as is, it does not work as the path is different (for example
<script language="JavaScript" src="../menu.js"></script>
etc.
Is this how menus usually work?
The paths have to be changed for each page?
Also, In the menu.js file itself, which is the file that contains the menu, there is the list of the items:
var MENU_ITEMS =[
["item1", "Home",
["sub-item1", "aaa.htm"],
["sub-item2", "bbb.htm"],
["sub-item3", "ccc.htm"]]
etc.
It works for one page, but when this file is included in another page, which is locatd in antother directory,it does not work, as the page that calls it is located somewhere else, and the paths should be changed,
as if it should be:
var MENU_ITEMS =[
["item1", "../Home",
["sub-item1", "../aaa.htm"],
["sub-item2", "../bbb.htm"],
["sub-item3", "../ccc.htm"]]
etc.
I am sure it should not work this way and that I have missed something big.
Can someone pls help out, toexplain the concept of menus, without using frames?
Thanks