From: "Thomas Lockney" <[EMAIL PROTECTED]> > Try == in the commented out if statement instead of =.
Ugh. I should have seen that. See what I get for copy/pasting off of random websites. While the JavaScript experts are paying attention, can someone explain (or add comments to) this, taken from tabs.js: function initMenu() { var menu = document.getElementById("menuList"); var items = menu.getElementsByTagName("li"); for (var i=0; i < items.length; i++) { items[i].firstChild.myIndex = i; items[i].firstChild.onclick=function() { setCookie("menuSelected", this.myIndex); }; } activateMenu(); } It looks like it's adding an onclick handler to every menu, like this: <div id="menuDiv"><ul id="menuList"> <li><a href="balanceSheet.do" title="Standard" onclick="setCookie('menuSelected',0);">Standard</a></li> <li><a href="?mode=Advanced" title="Advanced" onclick="setCookie('menuSelected',1);">Advanced</a></li> </ul></div> But what is the 'myIndex' part? (Seems like you're adding an arbitrary attribute to some tag?) Then when you get to calling setCookie, what is 'this' (and how do you know)? I need a big poster of all the elements and what attributes they have! Google was uncooperative, does such a thing exist? (Once upon a time I had a UML diagram of Struts as my desktop wallpaper.) -- Wendy Smoak ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ struts-menu-user mailing list [EMAIL PROTECTED] https://lists.sf.net/lists/listinfo/struts-menu-user