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: Saturday July 14 2012 - 06:07:09

Absolute vs relative URLS


Poster: jeallen
Dated: Saturday September 27 2003 - 21:37:38 BST

I have the menu bars working fine, but I read that I can use relative links vs absolute. I read this to mean I shouldbe able to do the following:

aI("text=Our Staff;url=http://www.fcc-hsv.org/staff/index.html;");
- or -
aI("text=Our Staff;url=/staff/index.html;");

However I get a script error when I use this syntax.

Is there something simple I am doing wrong here?


Poster: stephen702
Dated: Saturday September 27 2003 - 23:57:48 BST

If your menu page is in the default directory, your problem probably is the initial slash, which is sending your request to another directory.

Try

aI("text=Our Staff;url=staff/index.html;");


Poster: Hergio
Dated: Sunday September 28 2003 - 3:54:21 BST

You were right on the syntax there jeallen....the leading / means absolute URL and tells it to start from the root of the website and starting looking from there. To be getting a script error seems odd, if you could, please post a URL or your entire menu_data file. Thanks.

Yep is does indicate a script error, but only in FrontPage


Poster: jeallen
Dated: Monday September 29 2003 - 20:07:56 BST

It's really curious, the other problem I am experiencing is when previewing in FP 2002 the sub-image links appear broken (except in root level docs), unless a absolute (http://..) paths are used for the image. However, it works fine when published.

Its curious, because in this case, FP 2002 prview indicates a script error unless absolute paths are used for the URL:

aI("text=About Us Home;url=http://www.fcc-hsv.org/about_us/index.html;");
- vs -
aI("text=About Us Home;url=/about_us/index.html;");

However, Once again, it works fine when published. It is a greater concern however because it prevents me from verifying script operation prior to publishing.

menu_data.js is in root all scripts are in /milonic