adding/removing menu item

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
twing
Advanced
Advanced
Posts: 15
Joined: Wed Apr 20, 2005 7:17 am

adding/removing menu item

Post by twing »

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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

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://milonic.com/menumodules.php.
John
Post Reply