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

Problem opening sub menu pages


Poster: basils57
Dated: Monday August 6 2007 - 16:21:53 BST

Hi folks, I'm quite new to all of this and so far am pleased with my progress.

I have successfully constructed a simple horizontal menu which works, and have managed to position it on my pages using Method 2 as shown in the beginners section.

My problem now is getting my sub menu pages to open!
Part of the sub menu contained in the sub_data.js is

Quote:
with(milonic=new menuname("Outings")){
overflow="scroll";
style=menuStyle;
aI("text=Snowdon 2006;url=out_06.html;")
aI("text=Helvellyn 2007;url=out_07.html;")
}

and I have the pages out_06.html & out_07.html in the same file as the js files etc.
However, when I test the menu and click on the sub menu item, I get the file not found message, even though the path shown seems to be correct.

Any ideas please?


Poster: John
Dated: Monday August 6 2007 - 19:47:47 BST

Having the pages in the same directory as the menu files makes no difference. The way you have it coded says that the sub-menu pages you are trying to call are in the same directory as the page from which you are calling them.

So, for instance, if your menu files and the pages you are trying to call are in, say /menu/, and the page you are currently on that is trying to call those pages is in /mysite/, then the system expects to find those sub-menu pages in /mysite/, not in /menu/.

If that doesn't help, post for us a directory structure of your site indicating exactly what is where.


Poster: basils57
Dated: Tuesday August 7 2007 - 13:19:10 BST

HI John & thanks for that.
Unfortunately, I'm still no nearer to a solution, so please excuse my ignorance.

I have the main menu in the: embedded_main_menu.js
Quote:
orientation="horizontal";
style=menuStyle;
position="relative";

aI("text=HOME;url=index.html;");
aI("showmenu=Outings;text=OUTINGS;");
aI("showmenu=Routes;text=ROUTE MAP;");
aI("text=GALLERY;url=album/index.html;");
}


then I have the sub menus in: subs_data.js
Quote:
with(milonic=new menuname("Outings")){
overflow="scroll";
style=menuStyle;
aI("text=Snowdon 2006;url=/out_06.html;")
aI("text=Helvellyn 2007;url=out_07.html;")
}

with(milonic=new menuname("Routes")){
style=menuStyle;
aI("text=Snowdon 2006;url=route_06;")
aI("text=Helvellyn 2007;url=route_07;")


I have the following directory:
Site Name - Sloanes Rangers
Folders:
- images
- templates - (the menu is structured in main.dwt which forms the base for the html files listed)
- album (containing, amongst others, a file index.html which is different to the index.html file listed below)
Files:
- embedded_main_menu.js
- milonic_src.js
- mmenudom.js
- mmenus4.js
-sub_data_js
- css file
-index.html
-out_06.html
- out_07.html
-route_06.html
- route_07.html

I hope the above is clear, and you can advise where I am going wrong.


Poster: Ruth
Dated: Tuesday August 7 2007 - 20:44:54 BST

Hi,

I hate paths...grrrrr. Anyway, lets assume, since I don't really know from what you posted where things are, let's assume that your menu files are in the folder templates, given what you said that means the pages are in that folder also, and your 'main' folder, that is site url, is

Code:
www.sloanesrangers.com


That would mean that the url if I put in a full one for the page

[url]out_06.html[/url]

would be

Code:
http://www.sloanesrangers.com/templates/out_06.html


So, if you 'shorten' that leaving out the domain www stuff, then the url for that page is not [url]/out_06.html[/url] but rather [url]templates/out_06.html[/url]

Does that help? When i have a url problem I go to the aI and use the full url, if that works, then I know somehow I messed up in putting in the 'short' form url, and if it doesn't then I know I haven't uploaded the page, or the page was saved under another name, for example, maybe I skipped a letter or mispelled it when saving, or used capital letters someplace.

Ruth


Poster: basils57
Dated: Saturday August 18 2007 - 16:52:19 BST

Thanks for that Ruth, I have been away but am now working on it.

Will get back if problems persist.