MultiBar v1.01 by doron rosenberg (c) 2003 Netscape Communications Corp. Netscape grants you a royalty free license to use, modify or redistribute this software provided that this copyright notice appears on all copies. This software is provided "AS IS," without a warranty of any kind. Intro ===== MultiBar is a sidebar that can contain multiple other sidebars. Anyone is free to take the code and create their own MultiBars - Netscape DevEdge might even add it to the sidebar page if it is developer oriented. The Files ========= - cookie.html hidden HTML document that sets and gets cookies. It is needed because XUL documents can't set/get cookies. - sidebar.html HTML document that will originally be loaded into the sidebar panel. It will be replaced by either a) the last viewed sidebar or b) the first sidebar in the sidebar-contents.xml list. - sidebar.js the logic of MultiBar. - sidebar.xul defines the UI of the MultiBar in XUL. - sidebar-contents.xml contains the list of sidebars to populate the dropdown. The Sidebar List ================ The MultiBar gets the list of sidebars to show from the sidebar-contents.xml file. A sample sidebar-contents.xml file: DevEdge News http://devedge.netscape.com/viewsource/devedge-news_en.html CSS2 Quick Reference http://devedge.netscape.com/toolbox/sidebars/2001/css2qr/prop-visual.html A has 2 children - the element which is the name to be displayed in the sidebar selection dropdown and the element which is a URI to the sidebar. By default, the first is loaded. When a user chooses another item from the sidebar selection dropdown, a cookie is set (called "sidebarChoice") which contains the selected sidebar's position in the list. The code that sets the cookie is in cookie.html. Since the sidebar information is not stored in the user's browser but remote on a website, it is easily possible to add new sidebars to the list without needing the user to do anything.