View Full Version : Switch Menu - How to create two switch menus on the same page without conflict?

06-22-2006, 11:56 PM
I really enjoyed using the Switch Menu (http://www.dynamicdrive.com/dynamicindex1/switchmenu.htm). It is a great code! I have a problem with the menu when another menu is added on the same page. For example, left switch menu and a top switch menu. I find that a conflict occurs when this happens. For some reason, only one menu is able to perform the persistence function whereas the other doesn't work. I even tried playing around with the persistence variable with no avail because the variable only applies to the first switch menu which follows the specified guideline, that is, each SPAN content has to contain an incrementing ID starting at 1 (id="sub1", id="sub2", etc). This makes sense when dealing with one switch menu but doesn't apply to the second switch menu because it's sharing the same persistence variable which I believe is causing the problem. How can the code be modified to handle the second switch (or additional switch menu) to make them work correctly? I hope I'm on the right track, if not, please help and point me in the right direction. Much appreciated :)

Thank you in advance!