Problem opening sub menu pages

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
basils57
Beginner
Beginner
Posts: 3
Joined: Mon Aug 06, 2007 3:59 pm

Problem opening sub menu pages

Post by basils57 »

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
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?
Last edited by basils57 on Tue Aug 07, 2007 11:49 am, edited 1 time in total.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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.
John
basils57
Beginner
Beginner
Posts: 3
Joined: Mon Aug 06, 2007 3:59 pm

Post by basils57 »

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
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
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.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

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: Select all

www.sloanesrangers.com


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

out_06.html

would be

Code: Select all

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 /out_06.html but rather templates/out_06.html

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
basils57
Beginner
Beginner
Posts: 3
Joined: Mon Aug 06, 2007 3:59 pm

Post by basils57 »

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

Will get back if problems persist.
Post Reply