I have problems with my java menu web links if I paste a data file in a subfolder
Return to Recent Questions
Q:
I have a Menu called topnavbar.js when this menu is applied to a
page not in a subfolder the links work. This topnavbar menu includes
the following items; District Office, Cumberland Head Elementary
School, Beekmantown Elementary School, Beekmantown Middle School,
and Beekmantown High School.
However, if you put the topnavbar on a
page that is located in a subfolder the links in the topnavbar add
this subfolder name to the link.� So instead of districtoffice.htm
the link is transportation/districtoffice.htm and that page doesn�t
exist.
A:
You can use additional parameters to make menu paths absolute:
var pathPrefix_img = "http://domain.com/images/";
var pathPrefix_link = "http://domain.com/pages/";
These parameters allow to make images and links paths absolute.
For example:
var pathPrefix_img = "http://domain.com/images/";
var pathPrefix_link = "http://domain.com/pages/";
var menuItems = [
["text", "index.html", "icon1.gif", "icon2.gif"],
];
So, link path will be look so:
http://domain.com/pages/index.html
Images paths will be look so:
http://domain.com/images/icon1.gif
http://domain.com/images/icon2.gif
Please, try to use these parameters.
Return to Recent Questions
|