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

Collapsible Menu links


Poster: ssegura
Dated: Monday June 18 2007 - 17:00:28 BST

Ruth,

I am using the collapsible menu with great success. However I am trying
to do something and can not get the result I need. Don't know if it is
possible to create the effect.

I have an image map that has links to pages. When I click on the image map it
renders a specific page. When I add the code with no text item but with the url,
showmenu and type items to the menudata
file a blank space appears. I want the collapsible menu to open to the folder the pages are
under but do not want the pages to show up in the menu. Hope this makes sense.

In the example below I have a history folder, with links to Early Years, A
History of Change and a test page History 4 test. With the way I am
adding the link to History 4 a space always appears in the navigation. Is
there a way to add a link to History 4 without the text and space appearing
but yet have the menu stay open at the History level?

The menudata javascript code is attached as well. The code used is
under "Begin Left Navigation" History submenu.

Thanks in advance for your assistance.

Steve

http://preview.lcra.org/newsletter/webteam/overview/history/history4.html




Code:
_scrollAmount=5      // Used for Netscape 4 scrolling
_scrollDelay=10        // Used for Netscape 4 scrolling

_menuCloseDelay=500  // The delay for menus to remain visible on
mouse off
_menuOpenDelay=150   // The delay for opening menus on mouse over
_subOffsetTop=0;     // Sub menu offset Top position
_subOffsetLeft=0;  // Sub menu offset Left position

Goverfilter="Alpha(style=1,opacity=25,finishOpacity=100,startX=0,finishX=100,startY=100,
finishY=0);Fade(duration=0.2);Shadow(color='#777777', Direction=135,
Strength=5)"
Goverfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow
(color='#777777', Direction=135, Strength=5)"
Goutfilter="randomdissolve(duration=0.3)"
Goutfilter=""
Goverfilter=""

AllMargin=0

treeOffset=0;  // Used to set the offset of sub menus
singleMasterMenu=true // Informs the system to only have one menu open
at a time


//  Begin styles for header navigation
with(tstyle=new mm_style()){
offcolor = "#ffffff";     //  Font color for header navigation
fontweight = "bold";      // 
onbgcolor = "#E9EFF0";  //  Rollover background color of header nav
oncolor = "#550016";   //  Maroon roll-over color for header drop-down
offbgcolor="#239281";     //  Green category color
//ondecoration="underline";
borderstyle = "solid";
pagebgcolor = "#B5C7CB";
pagecolor = "#550016";
padding = 2;
fontsize = "10px";
fontfamily = "Verdana, Geneva, Arial, Helvetica, sans-serif";   
//subimageposition="top left" ;
}

subStyle=new copyOf(tstyle)
subStyle.offcolor = "#185665";  //  Green color text for header drop-down
subStyle.fontweight = "normal";
subStyle.onbgcolor="#550016";
subStyle.oncolor="#ffffff";
subStyle.offbgcolor="#ffffff";  //  White background color for header drop-down
subStyle.pagecolor="#51260B";
//subStyle.separatorcolor="#ffffff";

tstyle.clickbgcolor="#B5C7CB";
tstyle.pagecolor="#550016";   //  Color of header nav link to show which page is selected


//  *********** Begin styles for left navigation  ***********
with(tstyle1=new mm_style()){
offcolor = "#2b4560";   //  Blue color for left nav text links
fontweight = "bold";    //  Font style property of left nav
onbgcolor = "#E9EFF0";  //  Rollover background color of left nav
oncolor = "#2b4560";   //  Rollover blue color of left nav links
offbgcolor="#82A0A6";
ondecoration="underline";
borderstyle = "solid";
subimage="/newsletter/webteam/library/media/public/images/general/
arrow_nav_t.gif";
onsubimage="/newsletter/webteam/library/media/public/images/general/
arrow_nav_down_t.gif";
//bordercolor="";
//borderwidth=0;
padding = 2;
fontsize = "10px";
fontfamily = "Verdana, Geneva, Arial, Helvetica, sans-serif";   
subimageposition="top left" ;
separatorsize=1;
separatorcolor="#ffffff";
//subimagepadding=0;
//imagepadding=0;
itemwidth="131";
}

sub1Style=new copyOf(tstyle1)
sub1Style.offcolor = "#2b4560";
sub1Style.fontweight = "bold";
sub1Style.onbgcolor="#E9EFF0";
sub1Style.offbgcolor="#E9EFF0";
sub1Style.separatorcolor="#ffffff";
sub1Style.pagecolor="#550016";
//sub2Style.pagebgcolor="#B5C7CB";  // Middle shade of background color

with(tstyle2=new mm_style()){
offcolor = "#2b4560";   //  Blue color for left nav text links
fontweight = "bold";    //  Font style property of left nav
onbgcolor = "#E9EFF0";  //  Rollover background color of left nav
oncolor = "#2b4560";   //  Rollover blue color of left nav links
ondecoration="underline";
borderstyle = "solid";
subimage="/newsletter/webteam/library/media/public/images/general/
arrow_nav_t_level2.gif";
onsubimage="/newsletter/webteam/library/media/public/images/general/
arrow_nav_down_t_level2.gif";
//bordercolor="";
//borderwidth=0;
padding = 2;
fontsize = "10px";
fontfamily = "Verdana, Geneva, Arial, Helvetica, sans-serif";   
subimageposition="top left" ;
separatorsize=1;
separatorcolor="#ffffff";
//subimagepadding=0;
//imagepadding=0;
itemwidth="131";
}

sub2Style=new copyOf(tstyle2)
sub2Style.offcolor = "#2b4560";  // Darkest shade of background color
sub2Style.fontweight = "normal";
sub2Style.onbgcolor="#E9EFF0";  // Lightest shade of background color
sub2Style.offbgcolor="#ffffff";
sub2Style.separatorcolor="#ffffff";
sub2Style.pagecolor="#550016";
sub2Style.pagebgcolor="#B5C7CB";  // Middle shade of background color

with(tstyle3=new mm_style()){
offcolor = "#2b4560";   //  Blue color for left nav text links
fontweight = "bold";    //  Font style property of left nav
onbgcolor = "#E9EFF0";  //  Rollover background color of left nav
oncolor = "#2b4560";   //  Rollover blue color of left nav links
offbgcolor="";
ondecoration="underline";
borderstyle = "solid";
subimage="/newsletter/webteam/library/media/public/images/general/
arrow_nav_t_level3.gif";
onsubimage="/newsletter/webteam/library/media/public/images/general/
arrow_nav_down_t_level3.gif";
//bordercolor="";
//borderwidth=0;
padding = 2;
fontsize = "10px";
fontfamily = "Verdana, Geneva, Arial, Helvetica, sans-serif";   
subimageposition="top left" ;
separatorsize=1;
separatorcolor="#ffffff";
//subimagepadding=0;
//imagepadding=0;
itemwidth="131";
}

sub3Style=new copyOf(tstyle3)
sub3Style.offcolor = "#2b4560";
sub3Style.fontweight = "normal";
sub3Style.onbgcolor="#E9EFF0";
sub3Style.offbgcolor="#ffffff";
sub3Style.separatorcolor="#ffffff";
sub3Style.pagecolor="#550016";
sub3Style.pagebgcolor="#B5C7CB";

tstyle1.clickbgcolor="#B5C7CB";
tstyle1.pagecolor="#550016";   //  Color of left nav link to show which page is selected
tstyle2.clickbgcolor="#B5C7CB";
tstyle2.pagecolor="#550016";   //  Color of left nav link to show which page is selected
tstyle3.clickbgcolor="#B5C7CB";
tstyle3.pagecolor="#550016";   //  Color of left nav link to show which page is selected

// ****************  Begin Header Navigation  ********
//      with(new menuname("dummy")){
//      style=subStyle;
//      margin=AllMargin
//      }


//  Begin Overview submenu
with(new menuname("2C5D5C7A3A792D19E04012ACA90C0380.header")){
style = subStyle;
aI("text=History;url=/newsletter/webteam/overview/history/index.html;
showmenu=2CC4092F7EB08208E04012ACA90C5F42.header");
aI("text=Faq;url=/about/overview/faq.html;");
aI("text=Maps;url=/about/overview/maps/index.html;
showmenu=2CAEA9DB604B8D0AE04012ACA90C571D.header;");
aI("text=Public Meeting Calendar;url=/about/overview/meetings.html;");
aI("text=Financial Highlights;url=/about/overview/financial/index.html;
showmenu=2CC09FE38D131F8EE04012ACA90C1D3C.header;");
aI("text=Enabling Legislation;url=/about/overview/lcra_enabling_legislation.html;");
aI("text=Open Records Information;url=/about/overview/openrecords.html;");
aI("text=Contact LCRA;url=/about/overview/contact.html");
}

      //  Overview - History submenu
      with(new menuname("2CC4092F7EB08208E04012ACA90C5F42.header")){
      style=subStyle;
      margin=AllMargin
      aI("url=/newsletter/webteam/overview/history/history2.html;");
      aI("url=/newsletter/webteam/overview/history/history3.html;");
      }
      
      //  Overview - Maps submenu
      with(new menuname("2CAEA9DB604B8D0AE04012ACA90C571D.header")){
      style=subStyle;
      margin=AllMargin
      aI("url=/about/overview/maps/goc.html;");
      aI("url=/about/overview/maps/dsc.html;");
      aI("url=/energy/power/wholesale_customers/index.html;");
      aI("url=/about/overview/maps/energy_facilities.html;");      
      aI("url=/energy/trans/trans_system_map.html;");      
      aI("url=/about/overview/maps/water_wastewater_facilities_map.html;");
      aI("url=/about/overview/maps/dams_lakes.html;");
      aI("url=/about/overview/maps/irrigation_dist.html;");
      aI("url=/about/overview/maps/water_quality.html;");
      aI("url=/about/overview/maps/parks_preserves.html;");
      }
      
      //  Overview - Financial Highlights submenu
      with(new menuname("2CC09FE38D131F8EE04012ACA90C1D3C.header")){
      style=subStyle;
      margin=AllMargin
      aI("url=/about/overview/financial/annual_report.html;");
      }

//   End Overview *******************************************




// ***************      Begin Left Navigation       **************
// *******************************************************
   
//  Begin Overview section 
with(new menuname("2C5D5C7A3A792D19E04012ACA90C0380")){
style = sub2Style;
aI("text=History;url=/newsletter/webteam/overview/history/index.html;
showmenu=2CC4092F7E888208E04012ACA90C5F42;type=tree;");
aI("text=Faq;url=/about/overview/faq.html;showmenu=
2CAEA95AE1CD1E08E04012ACA90C5718;type=tree;");
aI("text=Maps;url=/about/overview/maps/index.html;
showmenu=2CAEA9DB604B8D0AE04012ACA90C571D;type=tree;");
aI("text=Public Meeting Calendar;url=/about/overview/meetings.html;
showmenu=2C9C4857F99B7FA2E04012ACA90C6B75;type=tree;");
aI("text=Financial Highlights;url=/about/overview/financial/index.html;showmenu=
2CC09FE38D401F8EE04012ACA90C1D3C;type=tree;");
aI("text=Enabling Legislation;url=/about/overview/lcra_enabling_legislation.html;
showmenu=2CC09D2B0EFF2751E04012ACA90C1D3E;type=tree;");
aI("text=Open Records Information;url=/about/overview/openrecords.html;showmenu=
2CC2669A79851EB1E04012ACA90C31C3;type=tree;");
aI("text=Contact LCRA;url=/about/overview/contact.html;showmenu=
2DD6B23502108A96E04012AC51EC3B39;type=tree;");
}

         //  History submenu
         with(new menuname("2CC4092F7E888208E04012ACA90C5F42")){
         style = sub3Style;
         aI("text=Early Years;url=/newsletter/webteam/overview/history/history2.html;
showmenu=2CC4092F7EB08208E04012ACA90C5F42;type=tree;");
         aI("text=An Era of Change;url=/newsletter/webteam/overview/history/history3.html;
showmenu=2CC2FE01DDBC7B93E04012ACA90C5E2D;type=tree;");
         aI("url=/newsletter/webteam/overview/history/history4.html;showmenu=
2CC2FE01DDBC7B93E04012ACA90C5E3D;type=tree;");
         }
      
               //  History - Early Years submenu
               with(new menuname("2CC4092F7EB08208E04012ACA90C5F42")){
               style = sub3Style;
               margin=AllMargin
               }
               
               //  History - An Era of Change submenu
               with(new menuname("2CC2FE01DDBC7B93E04012ACA90C5E2D")){
               style = sub3Style;
               margin=AllMargin
               }
               
               //  History4 - test submenu
               with(new menuname("2CC2FE01DDBC7B93E04012ACA90C5E3D")){
               style = sub3Style;
               margin=AllMargin
               }
      
         
      
// **************** End Overview section ******************
// ********************************************************
            

drawMenus()


Poster: Ruth
Dated: Monday June 18 2007 - 18:06:23 BST

Hi,

Well, if you put an item there, even without the text, it is going to show that space for the item since it is there. Nothing can be done about that.

If you are putting it there so that some submenu is open or something, then I think the only way to do that is to maybe use pagematch, or on the particular page where you want it open to put in the 'call' for that particular one to be opened on that page.

I'm not able to figure it out since you seem to be using some kind of file for the open branches so all I see openBranchByName(guid) and therefore don't have any actual name for what is supposed to be opened to see if I could figure something out

One thing on the item space. You maybe could set it up to use a blank spacer image and set the item height and see if it would get real small.

Ruth