The manageID function is working beautifully. However, I've come to know a number of mobile and tablet browsers to be so unpredictable that I want the assigned ID taken away entirely if a child menu item is clicked. And I need that takeawayID function for three-level menus.

Now, while the IDdisplay shows that when child menu hyperlink 2A is clicked (the only one I 'loaded up' with an onclick="takeawayID"), any ID is indeed taken away, but the child menu stays on display. And to add to the fun & confusion, if the line possessor.id = ' ' is outcommented, the reverse behavior is seen: any assigned ID is not taken away, but the child menu disappears... :-\

How must the code be changed so that it works properly?

Thanks in advance.

Frank_Conijn
—
2013-02-08T13:11:44Z —
#2

I found part of the answer. The child menu is part of the parent menu item, so when I click the child menu item I am virtually also clicking the parent menu item. And then both functions are executed. Thus, the ID is taken away anyway when I click a child menu item, also without the takeawayID function. So that problem is solved.

What remains is how I get the three-level menu to work. But I will probably start a new thread for that, because I think that will bring up a different question.