(c) 2007, DHTML-Menu.com
 
   
   
  Support
  Recent Questions
  Write To Support
 

    What is the correct method of referencing the webroot in the menu css horizontal?

Return to Recent Questions


Q: I have some pages that are in a sub folder on the server.
eg. index page is http://www.domain.com/index.html
but another page might be at
http://www.domain.com/somedir/somepage.html

And then the references do not work.
Currently I am editing the data.js file after saving it in menu css horizontal tuner.

What is the correct method of referencing the webroot (document root) in the menu css horizontal tuner?

A: You should write your links in the following way if you want to use relative paths.

File structure:

     dhtml-menu_files/
      dmenu.js
      data.js
     images/
     html_pages/
      page1.html
      page2.html

     index.html

So, you should write write all your paths relative to the index.html file.
For example, you paths will be:
    ["HOME","html_pages/page1.html", , , , "_self", "-1", , , ],
    ["ABOUT US","html_pages/page2.html", , , , , , , , ],

Unfortunately, DHTML Tuner can't do it automatically. You should correct your paths manually.

You can use additional parameters to make menu css horizontal 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

Related:
   
Copyright (c) 2012, DHTML-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Write Us
All rights reserved. bootstrap slider | criar sites gratis | web design software | website design software | css menu