Did you ever want to have a set of JavaScript widgets that could handle basic chores, such as menus (such as those above), pop-ups, invisible sections, image management, trees, etc., without a lot of special coding? Ever want to have this capability be browser-independent? Then you know that coding these things in JavaScript can be a major chore. You also know that finding such code on the web that is free, open-source, comprehensive and simple to use is problematic.

There are now some developing projects that aim at a general JavaScript application programming interface. If you are interested in such sophisticated capabilities (in open-source), I direct your attention to the DynAPI project and the netWindows project. I would also direct you to the jsui project, the judelib project and the XPDOM project, as examples of projects that are slightly less ambitious and/or earlier along. Morten's JavaScript Tree Menu project is an example of one widget (trees) in a production-stable stage. All of these projects are at sourceforge.net.

There are, obviously, other approaches that use a combination of technologies. One could, for example, use a combination of php and JavaScript. See the gmL-Modul project and the PHP Layers Menu project. There are solutions based on a combination of Java and JavaScript. See the WAB Abstract Windows Toolkit project.

The code you find on this site is pure JavaScript (though I will use php and server-side includes for my own convenience). It is also open source, licensed under the General Public License.

It is also, alas, in a preliminary stage of development. I happen to be a student at a major seminary. My time for this project is scarce and tends to be confined to summer months. At the moment, the menu code works for IE4+, Netscape 4.xx, Netscape 6+, Mozilla 1+, Galeon 1+, Konqueror 2+ and Opera 2+. (Netscape 4.xx support is fragile, due to the incompatibility of Netscape 4.xx layering technology. The menu.js script generates <layer> tags when it detects a Netscape 4.xx browser. Your other code should do likewise.)

The first application you see is the JavaScript implementation of pull-down menus. These menus may be tailored according to your preferred style by editing the styles of div.menuBar, img.menuBar, div.menuBody and div.menuItem. See this site's system.css file for details. You may also need to tweak the browser-dependent parameters in the brmenu.js script file. These parameters are all gathered into one place, but need a good deal of explaining. See the documentation page (in the menu above). They have not been tweaked for IE4/4.5. I noticed my tuning of IE6 was incorrect. This has been fixed on this site (though not yet in the download).

Note on Font Size
Font sizes can be a real problem with cross-platform portability. I have a laptop set up with Linux, and some of the fonts are not loaded, such as fonts-ISO8859-7, fonts-ISO8859-7-100dpi, and fonts-ISO8859-7-type1. When I set the font size of the menu items to 10pt, they show up as much smaller in Mozilla 1.0. Somehow, 12pt is more standard, in general, but Konqueror messes up on 12pt, even with all the RedHat distribution fonts loaded. Go figure! This complicates the menu code, somewhat, because it must tailor the font size and spacing to the browser. I have selected 10pt font for most browser/op-sys combinations, and 12pt font for Mozilla-based engines running under Linux because of this problem. I have also introduced character-width heuristics -- multiplyers for wide/narrow characters -- in order to tighten up the width of menu blocks.
Under Construction