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

Add to existing menus? V5


Poster: nekcih
Dated: Thursday February 19 2004 - 17:16:57 GMT

Is is possible to add links to alreadying existing menus and then redraw them? For example here's my initial menu...

with(MyMenu=new menuname("Main Menu")){
style=menuStyle0;
menuwidth=141;
itemwidth=141;
alwaysvisible=1;
orientation="vertical";
position="relative";

aI("text=  Links;showmenu=Links;");
aI("type=header;separatorsize=1;separatorpadding=5"); // separator
}

After doing this is there any way to add another aI() to the menu? Like this...

with(menuname["Main Menu"]){
aI("text=Added Later;url=http://www.bannerhealth.com/;");
}

I'm rebuilding the menu into a .net component for our intranet and I need to be able to write in different parts of a menu at different times in the code.

Any suggestions would be much appreciated.
Thanks.

SOLUTION: Add to existing menus? V5


Poster: nekcih
Dated: Thursday February 19 2004 - 17:32:08 GMT

Yah! I figured it out. Here's how you do it...

----------------------------------------------------------------
var MyMenu=new menuname("Main Menu");

with(MyMenu){
style=menuStyle0;
menuwidth=141;
itemwidth=141;
alwaysvisible=1;
orientation="vertical";
position="relative";

aI("text= Links;showmenu=Links;");
aI("type=header;separatorsize=1;separatorpadding=5"); // separator
}
----------------------------------------------------------------

Then somewhere later in my code...

----------------------------------------------------------------
with(MyMenu){
aI("text=Added Later;url=http://www.milonic.com/;");
}
----------------------------------------------------------------

You have to add to the menu before doing drawMenus().
Later all.


Poster: Ruth
Dated: Friday February 20 2004 - 13:45:18 GMT

Thanks, Mark for posting the solution when you figured it out. It really helps those of us who are not real knowledgeable...much better than the 'nevermind, I figured it out' one. :D

Ruth