Deleting menu item dynamically

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
udi
Beginner
Beginner
Posts: 7
Joined: Mon Aug 23, 2004 8:11 pm

Deleting menu item dynamically

Post by udi »

At the risk of being a nuisance, I'd like to ask this question one more time and I am hopeful of an answer. Andy and Kevin were kind enough to provide some wonderful code allowing me to add an item to a menu dynamically after it has been rendered (See this thread for more information). The other piece to this puzzle is of course the ability to remove a menu item dynamically as well.

I'm looking for a menuName.deleteItem(index) and a menuName.deleteAll() function would be nice to have as well (or at least help me find out how to get the number of items in a menu so I can loop through them).

Is something like this possible? Judging by the insertItem() code, I dont' think it should be too difficult. If I had a copy of the unobfuscated javascript menu code I could probably figure it out on my own, but it's one big jumble of text at the moment...

Thanks!
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

This is way beyond me, but have you checked out the menu methods and functions references? It does talk about getting parent items and menus etc. There is also a section on global variables which has references to integer_itemRef . I have no idea if anything there is of help for you.
Ruth
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Re: Deleting menu item dynamically

Post by kevin3442 »

udi wrote:At the risk of being a nuisance
Jeez! What a pain! ;) (just kidding of course)
udi wrote:I'd like to ask this question one more time and I am hopeful of an answer.
Im sorry. I guess I sort of lost track of that thread... hadn't realize that there were additional posts in it. I think what I'll do is reply in the original thread, so that the continuity of the thread isn't broken.

Cheers,

Kevin
Post Reply