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:17

Can't get menu links to work with pages in sub-directories

Poster: Linda
Dated: Tuesday January 17 2006 - 15:55:20 GMT

Can anyone help me with how I get my menu to work with the pages that are in a directory other than the one with the java script files and index page?

I have my index page in the root directory and my other pages in a Pages directory. If I put the link addresses so they work on the index page, they won't work on the other pages in the Pages directory.

Thank you!

Poster: Ruth
Dated: Tuesday January 17 2006 - 16:06:14 GMT

Hi Linda,

We need to see the page, please. Could you give us a link?


Link problems

Poster: Linda
Dated: Tuesday January 17 2006 - 17:19:56 GMT


Here's my draft copy of the site ... b-content/

The links only work on the index page. Once you go to any other page, the links no longer work. I know it's something to do with the file paths but don't know what!

Thanks... :roll:

Poster: Ruth
Dated: Tuesday January 17 2006 - 21:26:54 GMT


I have to tell you I am not the person for paths, I gave up and now use full paths everyplace :?

Anyway, have you tried putting a / in front of Pages? Not sure if that will work, as I said, I'm not a path person :oops:


Links not working when pages are in folders other than root

Poster: Linda
Dated: Tuesday January 17 2006 - 22:22:48 GMT

Thank you. I think I did try that one when I was going through every permutation I could think of to get it to work! I may just try to do a separate menu for the pages in the Pages folder if all else fails.

Thanks again...

Poster: kevin3442
Dated: Tuesday January 17 2006 - 23:40:12 GMT

Hi Linda,

It is, as Ruth says, a path issue (she knows more about it than she lets on!). Try this: Open the draft link that you gave us. You are now at ... b-content/

Now point to the "Birdie Stock" item in the main menu to open the submenu, then point at the "Birdie Stock '06" item. Stop. That item's url is set set to be relative to the current page's location on the server, because it has nothing preceding the folder name: url=Pages/birdie_stock.html; Now -- still pointing at "Birdie Stock '06" -- look at the status bar (bottom of the browser window); it shows you where it will want to go if you click that menu item. Since the current page came from ... b-content/

and the url=Pages/birdie_stock.html, the browser will want to go to ... stock.html (the %20s are spaces).

No problem. You're there.

Now open the same menu and point at the same item. Look at the status bar, and see the effect the relative path has. The currently displayed page came from ... stock.html

... a path/file that does not exist (you get a 404 error). See how it adds a second /Pages to the first one? That's because of the way you specify the path in the url property... you're telling the browser, "go to the 'Pages' folder located within the current folder... and there's isn't one!

How to fix?

If you put a / in front, it tells the browser to use the path relative to the root of the website. You say that didn't work. Probably because the site's root isn't ... eb-content

(just a guess). What is the root location of your site? Do you know? Knowing that would help devise a strategy. Also, are the folders and pages as they exist now the way you intend to keep it, or is it just for development purposes? Do you intend to move everything once it's done? That can affect the best strategy. Try to answer these, and we will help you come up with a better plan than having to maintain a set of menu_data files for every level of your site.

Here's a little test that might help.

Make a menu item like this

aI("text=test; url=/;");

Open the page and point at that "test" menu item. What location do you see in the browser's status bar? That's your wenbsite's root location. Can you tell us what it is?



Links not working when pages are in folders other than root

Poster: Linda
Dated: Wednesday January 18 2006 - 1:42:21 GMT

Hi Kevin!
I'm pretty sure my root folder is New Feathered Friends/web-content (I'm working in Go Live CS2 and that's how it sets up a site). I have my index.html and all the Milonic .js files there.

The site has lots of pages so I created another folder called "Pages".My problem is if I set the paths to work on the index page, they don't work on the other files in the Pages directory. I rechecked to see if it would work by putting a "/" in front of the Pages/mypage.html and no luck.

I do intend to keep the same set up when I put the site up (unless I absolutely have to dump all the pages in the root directory to get the menu to work!)

I tried the "test" link on my computer and nothing happened! No error message, nothing! I will put it up on my test site tomorrow to see what happens there. My dogs are barking up a's time for their peanut butter bones so I've got to go.

Thank you for all your help.
Linda :lol:

Links not working when pages are in folders other than root

Poster: Linda
Dated: Wednesday January 18 2006 - 14:15:17 GMT

Hi again and good morning!

I uploaded the new menu_data.js file with a "test" link under "Birdie Stock '06". I'm not getting any info on the link in the status bar...I don't think it's working (I'm using Safari).

More later!


Poster: kevin3442
Dated: Wednesday January 18 2006 - 19:02:00 GMT

Hi Linda,

In your test item, try url=/index.html

Does that take you to your home page?


links not working when pages are in folders other than root

Poster: Linda
Dated: Wednesday January 18 2006 - 20:22:03 GMT

I changed the url in the test link to index.html but it's still not working.

I think I am going to just put all the pages in the root directory, with the index page.

Thank you for helping! :lol: