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:41
adding/removing menu item
Poster: twing
Dated: Thursday June 16 2005 - 13:16:35 BST
How to add or remove menu item, after it has been declared. If I redeclared the menu again, milonic still renders the old declaration. For example:
with(milonic=new menuname("Anti Spam")){
style=menuStyle;
aI("text=Spam Cop;url=http://www.spamcop.net/;");
aI("text=Mime Defang;url=http://www.mimedefang.org/;");
aI("text=Spam Assassin;url=http://www.spamassassin.org/;");
}
with(milonic=new menuname("Anti Spam")){
style=menuStyle;
aI("text=Spam Assassin;url=http://www.spamassassin.org/;");
}
I would like the anti spam only contains 'Spam Assassin' menu item, but milonic still renders 3 menus.
Is there a function call to add/remove menu item?
I tried gmobj('Anti Spam'), but it returns null object.
Thanks,
Twing
Poster: John
Dated: Thursday June 16 2005 - 15:11:07 BST
Two menus with the same name is not allowed. The first is rendered, the second is ignored.
Try the mm_menueditapi.js bolt-on module at http://www.milonic.com/menumodules.php.