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:46
4 Issues- Stay on Sub, Frame Close, External .js, Center Sub
Poster: criscodejour
Dated: Sunday April 24 2005 - 18:17:20 BST
I'm a new user to the milonic menu (who switched from Opencube) and I think it's really great to find such an active and enthusiastic community behind this menu system. I have a few issues that I really can't seem to figure out. I've contacted support about this and they requested I post these issues here, so here I go.
I'm working on a site that can be viewed at: http://www.danforthdev.com/progress2 (this link is still using Opencube)
A zip file of the site with it's current Milonic work (and without extraneous images and content) can be downloaded here: http://www.danforthdev.com/milonic_progress2/milsup_prog2.zip
Here are the 4 issues in question, in order of importance from most to least important. Thanks for the support guys..
--------------------------------------------------
1) I've seen via Milonic's Menu samples (And their own site's menu navigation) that it very well have the ability to pinpoint and display where you are EXACTLY, down to the submenu. But I have yet to see an example of a menu that keeps the submenu open to the location. Since the menu I am constucting will be horizontal, and only go one level down, the space I have allotted allows them to stay open as I want them to.
Also another thing to consider is that the site is a multi-frame one, with a top frame dedicated to the menu content, so any code where you pinpoint your current location in the html, I presume, won't work. Unless you know how to make code like that in the content frame affect the menu in the top frame.
I'm trying to make the mneu finction as follows:
A) I would like the current location to stay open and highlighted
B) If the user brings the mouse back to the menu, the current child branch can dissapear and allow the user to browse the rest
C) If the user's mouse leaves the menu without clicking any locations, it should revert back to the current highlighted location and keep it open once again.
D) The only time the focus changes is when the user Clicks a new item, at which point, all of the above rules will apply to the new location.
This is actually the MAIN reason I switched from Opencube. It seemed as though Milonic has the ability to do this, but I just have no idea HOW, and it's been killing me for weeks. In addition to my gracious thanks, I will literally give 50 bucks to whoever can take care of this for me. If you can solve this, reply here, or email me at omesh __at__ madisyn.com.
--------------------------------------------------
2) Currently, when I run the "index.html" file, which contains the frameset, the "top_frame.html" file, the one containing the menu, is the only one that opens. It's almost like the "top_frame.html" closes the frameset and shows inly itself. What am I doing wrong?
--------------------------------------------------
3) I've tried to enter other .js files into the html code, such as the keypress.js file, but they don't seem to activate, and I can't figure out why. I'm using the proper code as far as I can tell. Can someone clue me in?
--------------------------------------------------
4) Lastly, and least important, is I would like to know how to center a submenu on the page. When you open the "top_frame.html" file, you will see that the main menu is in it's proper place, but the submenus (specifically the "Services" one) can open off of the alotted space I have set. I don't think defining an exact position would provide a permeable solution, and I imagine being able to center the submenu on the page dynamically would solve that problem, allowing me to give each menu item ample space, and still have it stay within my set area. How can I do this?
--------------------------------------------------
Again, a zip file with the site in it's current state (but without extraneous images and such) can be downloaded here: http://www.danforthdev.com/milonic_progress2/milsup_prog2.zip
I graciously thank in advance whoever helps me. As I've said, these issues have been killing me and I really need some closure =P.
Thanks,
Omesh Persaud
omesh __at__ madisyn.com
Poster: Ruth
Dated: Tuesday April 26 2005 - 1:29:06 BST
Hi,
Well, I can't answer in depth on these things, but most of the issues are due to the use of frames, even though the menu is in one frame. I do have one solution, the keeping of the menus open, however they will not close when you mouse over another main item. They have to be clicked closed. There are other options and I'm trying to see how to use them, but I'm not a code person so it takes a long time of experimenting.
So, to keep the submenu open when you click the main item, put the following function into the top of your menu data file.
Code:
var menuNumToClose = -1;
function adjustSubmenus()
{
var menuNumToOpen = getMenuByName(_mi[_itemRef][3]);
_m[menuNumToOpen][7] = 1;
if (menuNumToClose > -1 && menuNumToClose != menuNumToOpen) menuDisplay(menuNumToClose, 0);
menuNumToClose = menuNumToOpen
}
function adjustSubmenus()
{
var menuNumToOpen = getMenuByName(_mi[_itemRef][3]);
_m[menuNumToOpen][7] = 1;
if (menuNumToClose > -1 && menuNumToClose != menuNumToOpen) menuDisplay(menuNumToClose, 0);
menuNumToClose = menuNumToOpen
}
Then in the aI string add this
Code:
clickfunction=adjustSubmenus();
For example, your About string would look like this Code:
aI("image=mockup10_2_44.gif;overimage=mockup10_2_44_2.gif;showmenu=About;url=about.html;target=main;clickfunction=adjustSubmenus();");
And when you clicked that item, or any item in the submenu it will remain open. Again, be aware that it will only close by actually clicking the About again. I think there is a function on the forum to put in a little x image and a function that lets you close the menu with a click on the x, like the browser windows.
I'm looking at the other things, but one thing I can answer, the openmenusbyurl.js file will not work with the frames because the menu doesn't recognize that the url is open since it's in a frame, target=main is not a url.
As to the keypress.js I'm not sure that would work in frames, you have two frames which are to all intents and purposes two different browsers.
I'll keep looking at some of the other functions and see if I can get any to serve. You could actually do a neat design in which each page has it's own submenu on it at the top and open, i.e. set to alwaysvisible=1; when it loads.
Ruth-
Poster: kevin3442
Dated: Wednesday April 27 2005 - 6:50:33 BST
Hi Omesh,
I can solve 2 and 4 right away.
(2) You have a line of "frame buster" code in your top_frame.html file, where you load the milonic source code:
Code:
if (parent.frames.length) { top.location=document.location;}
Remove that line. Your frameset should now work.
(4) You can use the screenposition menu property to center your submenus. Place screenposition="center"; in the code that defines each submenu. For example, your Services menu would start as:
Code:
with(milonic=new menuname("Services")){
orientation="horizontal";
style=menuStyle;
align='center';
screenposition="center";
aI("status=atrisk;text=At Risk Developer;url=atrisk/atrisk_serv.html;target=main;");
<...etc...>
orientation="horizontal";
style=menuStyle;
align='center';
screenposition="center";
aI("status=atrisk;text=At Risk Developer;url=atrisk/atrisk_serv.html;target=main;");
<...etc...>
#1 should be do-able, but I'll have to play with it a bit.
#3... Ruth is right about openmenusbyurl.js; it won't work with a framed site. keypress.js may also have difficulties with a framed site, because it would only work if the focus is already in the "topFrame". If the focus is in the "main" frame, then keypresses will affect only that frame, not the frame containing your menu. I've never really tried keypress.js, but I may fiddle around with it some and see what I can come up with. I'll look at it some more.
Cheers,
Kevin
Poster: criscodejour
Dated: Wednesday April 27 2005 - 19:20:45 BST
You guys are amazing.
The current state of this can be viewed here: http://www.danforthdev.com/milonic_progress2/
Ruth:
Thanks for looking this up for me! The solution for #1 that you gave leaves the subs open, but gets confusing to deal with and it doesn't keep the current page/selection highlighted. Definitely keep me informed if you find anything else!
Kevin:
#2 and #4 solved, Thanks! So far it's looking great! Let me know if you find anything that can help me on #1 and #3
Seriously, you guys are awesome, and Milonic's menu system is definitely going to be one I plug often. Not only for it's great (and constantly evolving) set of features, but also for it's great support.
-Omesh
Poster: Ruth
Dated: Saturday April 30 2005 - 6:53:42 BST
Hi Omesh,
I'm working on two things. Sorry, I should have let you know. It will probably be sometime tommorow.
Ruth
Poster: criscodejour
Dated: Sunday May 1 2005 - 23:07:38 BST
That's fine..
I'm sorry for being such a pain. I would just like to get this whole fiasco over with so I can purchase a license and hand the site over to the client.
Thanks for the help!
-Omesh
Poster: Ruth
Dated: Monday May 2 2005 - 3:15:44 BST
Hi Omesh,
Well, I wasn't able to get anything to work to keep the submenus open and show the path and get them to close when you mouse over another main item.
I did come up with one solution, though I don't know if your client would want this. As an example: about1.js
Code:
with(menuStyle1=new mm_style()){
styleid=1;
bordercolor="#394d7f";
borderstyle="solid";
borderwidth=1;
onborder="1px dashed #bbb7d5";
fontfamily="Arial, Tahoma";
fontsize="72%";
fontstyle="bold";
offbgcolor="#394d7f";
offcolor="#ffffff";
onbgcolor="#353E69";
oncolor="#bbb7d5";
outfilter="";
overfilter="Fade(duration=0.2)";
padding="2 10";
pagecolor="#a8cff2";
pageclass="menupage";
pageborder="#bbb7d5";
separatorcolor="#8686B5";
separatorsize=0;
separatorpadding=5;
separatorheight=9;
}
with(milonic=new menuname("Aboutpages")){
orientation="horizontal";
style=menuStyle;
top=0;
left=43;
align='center';
alwaysvisible=1;
aI("status=Overview;text=Overview;url=overview.html;target=main;");
aI("status=Staff;text=Staff;url=staff.html;target=main;");
aI("status=Contact Us;text=Contact Us;url=contact.html;target=main;");
aI("status=Press;text=Press;url=press.html;target=main;");
aI("status=FAQ;text=FAQ;url=faq.html;target=main;");
}
drawMenus();
I created this file, then on all the pages which relate to About I placed the following calls styleid=1;
bordercolor="#394d7f";
borderstyle="solid";
borderwidth=1;
onborder="1px dashed #bbb7d5";
fontfamily="Arial, Tahoma";
fontsize="72%";
fontstyle="bold";
offbgcolor="#394d7f";
offcolor="#ffffff";
onbgcolor="#353E69";
oncolor="#bbb7d5";
outfilter="";
overfilter="Fade(duration=0.2)";
padding="2 10";
pagecolor="#a8cff2";
pageclass="menupage";
pageborder="#bbb7d5";
separatorcolor="#8686B5";
separatorsize=0;
separatorpadding=5;
separatorheight=9;
}
with(milonic=new menuname("Aboutpages")){
orientation="horizontal";
style=menuStyle;
top=0;
left=43;
align='center';
alwaysvisible=1;
aI("status=Overview;text=Overview;url=overview.html;target=main;");
aI("status=Staff;text=Staff;url=staff.html;target=main;");
aI("status=Contact Us;text=Contact Us;url=contact.html;target=main;");
aI("status=Press;text=Press;url=press.html;target=main;");
aI("status=FAQ;text=FAQ;url=faq.html;target=main;");
}
drawMenus();
Code:
<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>"); </script>
<SCRIPT language=JavaScript src="about1.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>"); </script>
<SCRIPT language=JavaScript src="about1.js" type=text/javascript></SCRIPT>
This sets this about submenu [which is the same as the one you get in the menu_data.js file] to always visible, so when you click the main menu and load any of the related pages they load with this menu visible at the top. The offbgcolor matches the top of the pages, and when that menu is used to go to another page the pagecolor is set to be blue, the color in the blue part of those pages and the fonts change to that color. If you try this and like it, I have all the coding on your pages and can zip them back to you.
The files for the other items are 2. services1.js
Code:
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=1;
_subOffsetLeft=-2;
with(menuStyle=new mm_style()){
styleid=1;
bordercolor="#394d7f";
borderstyle="solid";
borderwidth=1;
onborder="1px dashed #bbb7d5";
fontfamily="Arial, Tahoma";
fontsize="72%";
fontstyle="bold";
offbgcolor="#394d7f";
offcolor="#ffffff";
onbgcolor="#353E69";
oncolor="#bbb7d5";
outfilter="";
overfilter="Fade(duration=0.2)";
padding="2 10";
pagecolor="#a8cff2";
pageclass="menupage";
pageborder="#bbb7d5";
separatorcolor="#8686B5";
separatorsize=0;
separatorpadding=5;
separatorheight=9;
}
with(milonic=new menuname("Servicespages")){
orientation="horizontal";
style=menuStyle;
top=0;
left=43;
align='center';
alwaysvisible=1;
aI("status=atrisk;text=At Risk Developer;url=atrisk_serv.html;target=main;");
aI("status=devinpart;text=Development In Partnership;url=devinpart_serv.html;target=main;");
aI("status=devconsultant;text=Development Consultant;url=devcon_serv.html;target=main;");
aI("status=gencon;text=General Contractor;url=gencon_serv.html;target=main;");
aI("status=Glossary;text=Glossary;url=glossary.html;target=main;");
}
drawMenus();
_menuOpenDelay=150;
_subOffsetTop=1;
_subOffsetLeft=-2;
with(menuStyle=new mm_style()){
styleid=1;
bordercolor="#394d7f";
borderstyle="solid";
borderwidth=1;
onborder="1px dashed #bbb7d5";
fontfamily="Arial, Tahoma";
fontsize="72%";
fontstyle="bold";
offbgcolor="#394d7f";
offcolor="#ffffff";
onbgcolor="#353E69";
oncolor="#bbb7d5";
outfilter="";
overfilter="Fade(duration=0.2)";
padding="2 10";
pagecolor="#a8cff2";
pageclass="menupage";
pageborder="#bbb7d5";
separatorcolor="#8686B5";
separatorsize=0;
separatorpadding=5;
separatorheight=9;
}
with(milonic=new menuname("Servicespages")){
orientation="horizontal";
style=menuStyle;
top=0;
left=43;
align='center';
alwaysvisible=1;
aI("status=atrisk;text=At Risk Developer;url=atrisk_serv.html;target=main;");
aI("status=devinpart;text=Development In Partnership;url=devinpart_serv.html;target=main;");
aI("status=devconsultant;text=Development Consultant;url=devcon_serv.html;target=main;");
aI("status=gencon;text=General Contractor;url=gencon_serv.html;target=main;");
aI("status=Glossary;text=Glossary;url=glossary.html;target=main;");
}
drawMenus();
3. ifyouare1.js
Code:
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=1;
_subOffsetLeft=-2;
with(menuStyle=new mm_style()){
styleid=1;
bordercolor="#394d7f";
borderstyle="solid";
borderwidth=1;
onborder="1px dashed #bbb7d5";
fontfamily="Arial, Tahoma";
fontsize="72%";
fontstyle="bold";
offbgcolor="#394d7f";
offcolor="#ffffff";
onbgcolor="#353E69";
oncolor="#bbb7d5";
outfilter="";
overfilter="Fade(duration=0.2)";
padding="2 7";
pagecolor="#a8cff2";
pageclass="menupage";
pageborder="#bbb7d5";
}
with(milonic=new menuname("IfYouArepages")){
orientation="horizontal";
style=menuStyle;
top=0;
left=43;
align='center';
alwaysvisible=1;
aI("status=privland;text=Private Landowner;url=privlandowner.html;target=main;");
aI("status=nonprofit;text=Non-Profit Organization;url=nonforprofit.html;target=main;");
}
drawMenus();
4.investmentopps1.js_menuOpenDelay=150;
_subOffsetTop=1;
_subOffsetLeft=-2;
with(menuStyle=new mm_style()){
styleid=1;
bordercolor="#394d7f";
borderstyle="solid";
borderwidth=1;
onborder="1px dashed #bbb7d5";
fontfamily="Arial, Tahoma";
fontsize="72%";
fontstyle="bold";
offbgcolor="#394d7f";
offcolor="#ffffff";
onbgcolor="#353E69";
oncolor="#bbb7d5";
outfilter="";
overfilter="Fade(duration=0.2)";
padding="2 7";
pagecolor="#a8cff2";
pageclass="menupage";
pageborder="#bbb7d5";
}
with(milonic=new menuname("IfYouArepages")){
orientation="horizontal";
style=menuStyle;
top=0;
left=43;
align='center';
alwaysvisible=1;
aI("status=privland;text=Private Landowner;url=privlandowner.html;target=main;");
aI("status=nonprofit;text=Non-Profit Organization;url=nonforprofit.html;target=main;");
}
drawMenus();
Code:
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=1;
_subOffsetLeft=-2;
with(menuStyle=new mm_style()){
styleid=1;
bordercolor="#394d7f";
borderstyle="solid";
borderwidth=1;
onborder="1px dashed #bbb7d5";
fontfamily="Arial, Tahoma";
fontsize="72%";
fontstyle="bold";
offbgcolor="#394d7f";
offcolor="#ffffff";
onbgcolor="#353E69";
oncolor="#bbb7d5";
outfilter="";
overfilter="Fade(duration=0.2)";
padding="2 7";
pagecolor="#a8cff2";
pageclass="menupage";
pageborder="#bbb7d5";
}
with(milonic=new menuname("InvestmentOppspages")){
orientation="horizontal";
style=menuStyle;
top=0;
left=43;
align='center';
alwaysvisible=1;
aI("text=InvettmentOpps is an;url=investopps_test0.html;target=main;");
aI("text=Empty Submenu;url=investopps_test1.html;target=main;");
aI("text=To Set Data File;url=investopps_test2.html;target=main;");
aI("text=Items Have Pages ;url=investopps_test3.html;target=main;");
aI("text=For Link Test;url=investopps_test4.html;target=main;");
}
drawMenus();
5.projects1.js_menuOpenDelay=150;
_subOffsetTop=1;
_subOffsetLeft=-2;
with(menuStyle=new mm_style()){
styleid=1;
bordercolor="#394d7f";
borderstyle="solid";
borderwidth=1;
onborder="1px dashed #bbb7d5";
fontfamily="Arial, Tahoma";
fontsize="72%";
fontstyle="bold";
offbgcolor="#394d7f";
offcolor="#ffffff";
onbgcolor="#353E69";
oncolor="#bbb7d5";
outfilter="";
overfilter="Fade(duration=0.2)";
padding="2 7";
pagecolor="#a8cff2";
pageclass="menupage";
pageborder="#bbb7d5";
}
with(milonic=new menuname("InvestmentOppspages")){
orientation="horizontal";
style=menuStyle;
top=0;
left=43;
align='center';
alwaysvisible=1;
aI("text=InvettmentOpps is an;url=investopps_test0.html;target=main;");
aI("text=Empty Submenu;url=investopps_test1.html;target=main;");
aI("text=To Set Data File;url=investopps_test2.html;target=main;");
aI("text=Items Have Pages ;url=investopps_test3.html;target=main;");
aI("text=For Link Test;url=investopps_test4.html;target=main;");
}
drawMenus();
Code:
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=1;
_subOffsetLeft=-2;
with(menuStyle=new mm_style()){
styleid=1;
bordercolor="#394d7f";
borderstyle="solid";
borderwidth=1;
onborder="1px dashed #bbb7d5";
fontfamily="Arial, Tahoma";
fontsize="72%";
fontstyle="bold";
offbgcolor="#394d7f";
offcolor="#ffffff";
onbgcolor="#353E69";
oncolor="#bbb7d5";
outfilter="";
overfilter="Fade(duration=0.2)";
padding="2 7";
pagecolor="#a8cff2";
pageclass="menupage";
pageborder="#bbb7d5";
separatorcolor="#8686B5";
separatorsize=0;
separatorpadding=5;
separatorheight=9;
}
with(milonic=new menuname("Projectspages")){
orientation="horizontal";
style=menuStyle;
top=0;
left=43;
align='center';
alwaysvisible=1;
aI("status=atrisk;text=At Risk Developer;url=atrisk_proj.html;target=main;");
aI("status=devinpart;text=Development In Partnership;url=devinpart_proj.html;target=main;");
aI("status=devconsultant;text=Development Consultant;url=devcon_proj.html;target=main;");
aI("status=gencon;text=General Contractor;url=gencon_proj.html;target=main;");
}
drawMenus();
_menuOpenDelay=150;
_subOffsetTop=1;
_subOffsetLeft=-2;
with(menuStyle=new mm_style()){
styleid=1;
bordercolor="#394d7f";
borderstyle="solid";
borderwidth=1;
onborder="1px dashed #bbb7d5";
fontfamily="Arial, Tahoma";
fontsize="72%";
fontstyle="bold";
offbgcolor="#394d7f";
offcolor="#ffffff";
onbgcolor="#353E69";
oncolor="#bbb7d5";
outfilter="";
overfilter="Fade(duration=0.2)";
padding="2 7";
pagecolor="#a8cff2";
pageclass="menupage";
pageborder="#bbb7d5";
separatorcolor="#8686B5";
separatorsize=0;
separatorpadding=5;
separatorheight=9;
}
with(milonic=new menuname("Projectspages")){
orientation="horizontal";
style=menuStyle;
top=0;
left=43;
align='center';
alwaysvisible=1;
aI("status=atrisk;text=At Risk Developer;url=atrisk_proj.html;target=main;");
aI("status=devinpart;text=Development In Partnership;url=devinpart_proj.html;target=main;");
aI("status=devconsultant;text=Development Consultant;url=devcon_proj.html;target=main;");
aI("status=gencon;text=General Contractor;url=gencon_proj.html;target=main;");
}
drawMenus();
I'm sorry I couldn't come up with a better solution, but nothing I tried worked. I don't know if anyone with programming or function knowledge could figure something else. The reason for the inability to do all you want is the use of frames. There is a frames demo which uses the menu across frames, but I do not know if the various functions like pagebgcolor and such function. What this does is allow the submenus to be opened from one frame into another.
Again, sorry the news isn't better. If this solution will work for you, I can zip the pages I coded with these file calls and the data files for you. Just let me know.
Ruth
Poster: criscodejour
Dated: Monday May 2 2005 - 5:32:28 BST
Ruth,
Could you post the files you have for the solution you posted? Despite the instructions, I still can't seem to get it working so I could see exactly how it works.
If frames are really the problem, then I'll go out on a limb and get rid of them. I've compiled a version of the site for you, without frames, with the menu on every page. If you can get all the functionality I require without frames, then I see that as a reasonable sacrifice.
Here is the Link:
http://www.danforthdev.com/milonic_prog ... lprog3.zip
Hey kevin3442, got anything for us to look at?
-Omesh
Poster: Ruth
Dated: Monday May 2 2005 - 8:50:34 BST
Hi Omesh,
LINK REMOVED:
Can you tell me what all in the zip is yours? It looks like there are a lot of milonic demo files. When I unzip it doens't make little folders for me, I have to create all that so I kind of need to know what isn't yours.
Ruth
Poster: Ruth
Dated: Monday May 2 2005 - 11:50:36 BST
Hi again,
OK, I fixed your non-framed pages. They now will
#1. highlight the main menu item when you click it
#2. open the corresponding submenu when you click a main menu item
#3. close the submenu when you mouseover a different main menu item, and reopen the submenu when you mouse off the other item, unless you clicked the item, then it opens the corresponding menu for that item.
#4. highlights the submenu item when it's on the corresponding page.
#'s 2, 3 & 4 are working because this is not a frameset and the openmenusbyurl.js file now works, as do the pagebgcolor and pagecolor parameters in the menuStyle.
As for #1
1. highlighting the main menu item: because you have images the pagebgcolor and pagecolor won't work. Instead you need to use pageimage. Since each main item is a different image, you either need to make a 3rd image using the colors you want, or you can do what I did which was to use the overimage as the pageimage. For the highlight you have to put the code on the actual page.
Code:
1. On the home.html page, the home aI string would be:
aI("image=images/mockup10_2_43.gif;overimage=images/mockup10_2_43_2.gif;showmenu=Home;url=home.html;pageimage=images/mockup10_2_43_2.gif;");
2. on the about.html page the aI string would be:
aI("image=images/mockup10_2_44.gif;overimage=images/mockup10_2_44_2.gif;showmenu=About;url=about.html;pageimage=images/mockup10_2_44_2.gif;");
And so on for each of the 'main' pages.
aI("image=images/mockup10_2_43.gif;overimage=images/mockup10_2_43_2.gif;showmenu=Home;url=home.html;pageimage=images/mockup10_2_43_2.gif;");
2. on the about.html page the aI string would be:
aI("image=images/mockup10_2_44.gif;overimage=images/mockup10_2_44_2.gif;showmenu=About;url=about.html;pageimage=images/mockup10_2_44_2.gif;");
I put all the corrected pages into this zip file. I only put the pages in the file since I figured you had the images.
I'm sorry I couldn't figure out some way to do all of this with a frameset. Personally I like frames, particularly simple sets like you created.
I hope this helps.
Ruth
Poster: Ruth
Dated: Monday May 2 2005 - 12:55:08 BST
I forgot one of the most important things. If you look in the menu_data.js file you'll notice that in each submenu which has items there is a 'new' item. The reason for this is that when you click the main item it loads the 'entry' page for that section. That page is not in any submenu so the submenu for that section will not open.
Using the About as an example, in the about submenu you need to change the last line that is now there and add a line. The existing last line is
Code:
aI("status=FAQ;text=FAQ;url=faq.html;itemwidth=60;");
The file needs to be change so the About submenu ends like this:
Code:
aI("status=FAQ;text=FAQ;url=faq.html;itemwidth=60;separatorsize=0;");
aI("text= ;url=about.html;itemwidth=1;pagebgcolor=#353E69;");
}
aI("text= ;url=about.html;itemwidth=1;pagebgcolor=#353E69;");
}
You need to put the separatorsize=0; to prevent a separator bar from showing up, and you need the pagebgcolor set to #353E69 which is the offbgcolor to prevent a blue 'match' from showing. Coded in this way, when you arrive on the about.html page the submenu from the main About link is open and the empty item that permitted that does not show.
Ruth
Poster: criscodejour
Dated: Monday May 2 2005 - 22:46:15 BST
Ruth, you're a godsend. It works perfectly. Thank you so much!
I'm currently in the process of trying to simulate the frame functionaility by using tables and the div overflow tags, since I imagine one reason they liked frames so much is because the logo and menu always stay visible.
I have one more issue for you relating to this: Is it possible for me to have subs highlighted for pages that AREN't mentioned in the menu? For example, "215w125_1_serv.html" isn't listed on the menu, but it's a "Services Offering" which is under "At Risk Developer". So I'd want the "At Risk Developer" submenu item highlighted while browsing that page.
It it doable?
And thanks again Ruth, You've seriously helped with this massive weight on my chest.
-Omesh
Poster: Ruth
Dated: Monday May 2 2005 - 23:45:46 BST
Yes, you can do that. You can use the pagematch and match a directory instead of a page. However, that means that any page in that directory will show a match. So for example you couldn't have an atrisk folder in which you put both the at risk development pages for both services and projects. I can play with it and see if I can set up how to do it. It becomes confusing.
Ruth
Poster: Ruth
Dated: Tuesday May 3 2005 - 2:58:38 BST
Well, Omesh, I just found that the pagematch will not work. The reason is you are using the openmenusbyurl.js file to open the subs, they will not be open when you go to the page from the link. However, I do have a solution,
Copy and paste this code to another menu_data.js file, I called it 2_opensubs_data.js, but that was just so I remembered what it was. Once you create that new js file, you need to place that in addition to the menu_data.js file on all those 'sub' pages. The ones you reach through a page link.
Code:
//empty _serv menus with urls to trigger the openmenusbyurl file when page link is used
with(milonic=new menuname("atrisk_serv")){
orientation="horizontal";
style=menuStyle;
aI("text=;url=215w125_1_serv.html;separatorsize=0");
aI("text=;url=215w125_lobby_serv.html;separatorsize=0");
aI("text=;url=215w125_sixth_serv.html;separatorsize=0");
aI("text=;url=215w125_workcomp_serv.html;separatorsize=0");
aI("text=;url=55w125_1_serv.html;separatorsize=0");
}
with(milonic=new menuname("devpart_serv")){
orientation="horizontal";
style=menuStyle;
aI("text=;url=northgen_serv.html;separatorsize=0");
}
with(milonic=new menuname("devcon_serv")){
orientation="horizontal";
style=menuStyle;
aI("text=;url=sju_1_serv.html;separatorsize=0");
aI("text=;url=unitedhouse_1_serv.html;separatorsize=0");
}
with(milonic=new menuname("gencon_serv")){
orientation="horizontal";
style=menuStyle;
aI("text=;url=louisew_serv.html;separatorsize=0");
aI("text=;url=marcjacobs_serv.html;separatorsize=0");
aI("text=;url=pdiddy_1_serv.html;separatorsize=0");
}
//end empty _serv submenus
//empty _proj menus to trigger openmenusbyurl on page links
with(milonic=new menuname("atrisk_proj")){
orientation="horizontal";
style=menuStyle;
aI("text=;url=215w125_1_serv.html;separatorsize=0");
aI("text=;url=215w125_lobby_serv.html;separatorsize=0");
aI("text=;url=215w125_sixth_serv.html;separatorsize=0");
aI("text=;url=215w125_workcomp_serv.html;separatorsize=0");
aI("text=;url=55w125_1_serv.html;separatorsize=0");
}
with(milonic=new menuname("devpart_proj")){
orientation="horizontal";
style=menuStyle;
aI("text=;url=northgen_proj.html;separatorsize=0");
}
with(milonic=new menuname("devcon_proj")){
orientation="horizontal";
style=menuStyle;
aI("text=;url=sju_1_proj.html;separatorsize=0");
aI("text=;url=unitedhouse_1_proj.html;separatorsize=0");
}
with(milonic=new menuname("gencon_proj")){
orientation="horizontal";
style=menuStyle;
aI("text=;url=louisew_proj.html;separatorsize=0");
aI("text=;url=marcjacobs_proj.html;separatorsize=0");
aI("text=;url=pdiddy_1_proj.html;separatorsize=0");
}
//end empty _proj submenus for openmenusbyurl triggered from page link
drawMenus();
I only made the sub-submenus for the services and projects, though at this point you don't have a projects submenu yet. But, I could figure out what pages would be in it. Following the example here, you would need to make these kinds of menus for any downlevel pages you reach through a page link if you want the related menu to be open on that page.with(milonic=new menuname("atrisk_serv")){
orientation="horizontal";
style=menuStyle;
aI("text=;url=215w125_1_serv.html;separatorsize=0");
aI("text=;url=215w125_lobby_serv.html;separatorsize=0");
aI("text=;url=215w125_sixth_serv.html;separatorsize=0");
aI("text=;url=215w125_workcomp_serv.html;separatorsize=0");
aI("text=;url=55w125_1_serv.html;separatorsize=0");
}
with(milonic=new menuname("devpart_serv")){
orientation="horizontal";
style=menuStyle;
aI("text=;url=northgen_serv.html;separatorsize=0");
}
with(milonic=new menuname("devcon_serv")){
orientation="horizontal";
style=menuStyle;
aI("text=;url=sju_1_serv.html;separatorsize=0");
aI("text=;url=unitedhouse_1_serv.html;separatorsize=0");
}
with(milonic=new menuname("gencon_serv")){
orientation="horizontal";
style=menuStyle;
aI("text=;url=louisew_serv.html;separatorsize=0");
aI("text=;url=marcjacobs_serv.html;separatorsize=0");
aI("text=;url=pdiddy_1_serv.html;separatorsize=0");
}
//end empty _serv submenus
//empty _proj menus to trigger openmenusbyurl on page links
with(milonic=new menuname("atrisk_proj")){
orientation="horizontal";
style=menuStyle;
aI("text=;url=215w125_1_serv.html;separatorsize=0");
aI("text=;url=215w125_lobby_serv.html;separatorsize=0");
aI("text=;url=215w125_sixth_serv.html;separatorsize=0");
aI("text=;url=215w125_workcomp_serv.html;separatorsize=0");
aI("text=;url=55w125_1_serv.html;separatorsize=0");
}
with(milonic=new menuname("devpart_proj")){
orientation="horizontal";
style=menuStyle;
aI("text=;url=northgen_proj.html;separatorsize=0");
}
with(milonic=new menuname("devcon_proj")){
orientation="horizontal";
style=menuStyle;
aI("text=;url=sju_1_proj.html;separatorsize=0");
aI("text=;url=unitedhouse_1_proj.html;separatorsize=0");
}
with(milonic=new menuname("gencon_proj")){
orientation="horizontal";
style=menuStyle;
aI("text=;url=louisew_proj.html;separatorsize=0");
aI("text=;url=marcjacobs_proj.html;separatorsize=0");
aI("text=;url=pdiddy_1_proj.html;separatorsize=0");
}
//end empty _proj submenus for openmenusbyurl triggered from page link
drawMenus();
Finally, in your regular main menu_data.js file make this the services menu
Code:
with(milonic=new menuname("Services")){
orientation="horizontal";
style=menuStyle;
align='center';
screenposition="center";
aI("status=atrisk;text=At Risk Developer;url=atrisk_serv.html;itemwidth=110;showmenu=atrisk_serv;");
aI("status=devinpart;text=Development In Partnership;url=devinpart_serv.html;itemwidth=160;showmenu=devpart_serv;");
aI("status=devconsultant;text=Development Consultant;url=devcon_serv.html;itemwidth=145;showmenu=devcon_serv;");
aI("status=gencon;text=General Contractor;url=gencon_serv.html;itemwidth=115;showmenu=gencon_serv;");
aI("status=Glossary;text=Glossary;url=glossary.html;itemwidth=65;separatorsize=0;");
aI("text= ;url=services.html;itemwidth=1;pagebgcolor=#353E69;");
}
you note that each item is now 'calling' the corresponding empty sub I made in the other file. I tested it in IE and Netscape and it worked fine. The reason for this is that you are using that openmenusbyurl.js module, with this on those downlevel pages when you click on a link from say devcon_serv.html page to one of them, the actual Services submenu will be open on that page and whichever item you originally clicked for the main page will be that pretty purple color to show where you are.orientation="horizontal";
style=menuStyle;
align='center';
screenposition="center";
aI("status=atrisk;text=At Risk Developer;url=atrisk_serv.html;itemwidth=110;showmenu=atrisk_serv;");
aI("status=devinpart;text=Development In Partnership;url=devinpart_serv.html;itemwidth=160;showmenu=devpart_serv;");
aI("status=devconsultant;text=Development Consultant;url=devcon_serv.html;itemwidth=145;showmenu=devcon_serv;");
aI("status=gencon;text=General Contractor;url=gencon_serv.html;itemwidth=115;showmenu=gencon_serv;");
aI("status=Glossary;text=Glossary;url=glossary.html;itemwidth=65;separatorsize=0;");
aI("text= ;url=services.html;itemwidth=1;pagebgcolor=#353E69;");
}
One last thing, I noticed that on the following service pages the links don't go to the serv.html pages but to the proj.html pages.
Code:
215w125_lobby_serv.html links go to _proj.html
215w125_sixth_serv.html links go to _proj.html
215w125_workcomp_serv.html links go to _proj.html pages
215w125_sixth_serv.html links go to _proj.html
215w125_workcomp_serv.html links go to _proj.html pages
Hope this helps
Ruth