View Full Version : FlexDropDown - Changing menu assignment

02-23-2011, 04:24 PM
1) Script Title: FlexDropDown

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/flexdropdown.htm
and supplement at

3) Describe problem:
I have three dropdowns like [Link1] [Link2] [Link3]
where the options in Link2 need to be dependent on what is selected in Link1. I know from the supplement that I can dynamically assign a menu to a link, but by trying it I found this does not replace any existing menu assignment, but adds a second menu to the link. Is there a way to dynamically change the menu for Link 2. Actually mine are not links but textboxes, but the documentation uses links so I used that here.

I assume I could change the element data-attribute with something like
document.forms['form1'].elements['alrt'].setAttribute("data-flexmenu", "rmenu2");
but this does not rebuild the menu. Any way to do that? How about clear and rebuild all the menus on the page? Any way to do that?

Thanks for any help,