Swapping SubMenues in the lower frames and Positioning the Menues.
Introduction
So far we have not been able to configure the TwinHelix menu script to associate different menues with different html pages within the frameset (A topic discussed on page 5). Therefore no effort is made to introduce the name of a particular artist or album into the upper frames. We are using one data.js file which is associated with the frameset page itself. This data.js file configures all the menues and associates the menues with the different frames. A more sophisticated use of the script would likely make menu swapping in our upper frames of what are called "root menus" possible. But often such a swap is not of much importance and we can achieve a satisfactory result by "swapping" submenues in the lower frames beneath the heads of generically titled root menues in the upper frames.
Positioning of Menues
All DHTML menu programs which we have encountered use 2 numerical co-ordinates to position menu elements: A horizontal co-ordinant along what is called the "x-axis" & a vertical co-ordinant along what is called the "y-axis". The co-ordinants represent measurements, in terms of pixels, placing the menu element a fixed distance from either the left edge rightward (x-axis) or top edge downward (y-axis) of a frame, or an existing "parent" menu element.
You definitely need to read the section "Script Syntax Reference" on the "pop_syntax.html" help file page which is included in the download package from Twinhelix. Differring methods for positioning of the menues and the javascript needed to make them work is well documented there. Hopefully our example will help illumunate the text which is not so complicated as the results you can achieve by reading it with care.
Our [View Select-Playlist] and its submenu system is entirely independent from the [Select Artist - Playlist] to its left.
Here's our example without its top left root menu.
There is nothing unusual in the construction of the [View - Select Playlist] menu system. Except for the method of positioning, this menu follows the same logic as a "normal" entry. The horizontal ( x-axis ) positioning of the songlists displayed in the lower lefthand frame is accomplished as if these submenues were "root menus": they are positioned with reference to the lefthand edge of the frame (in our example all at 10 or '10'). The vertical ( y-axis ) positioning can be done in the same way ( in our case all at '5' ) or with refrence to their parents ( in our case at 0, - 22, - 44, etc ).
(See "Script Syntax Reference: startMenu-Offsets")
Our [Select - Artist Playlist] menu system is unusual in that it requires a "hidden root menu" for each of the songlists and an "on-click event handler" to make them appear. In our example a mouse click on each entry in the [ Select Artist Playlist ] submenu accomplishes the same effect as would a mouseover in negative territory. (See "Script Syntax Reference: Extending The Script")
The "hidden roots" are positioned off screen by the use of negative co-ordinants ( in our case all at - 105 x-axis, & - 105 y-axis ) and it doesn't seem to matter which frame is chosen as their home. The songlist submenues may be positioned with reference to their "hidden roots" ( in our case all at 115 x-axis; & 110 y-axis ). Alternately the songlist submenues may be positioned with reference to the edges of their frame ( in our case all at '10' x-axis; & '5' y-axis ). (See "Script Syntax Reference: startMenu-Offsets")
The Opera 7 Problem
Our frameset, coupled with the twinhelix script, works well in NS4, IE6; Moz1.0 & 1.5; Opera6 and Opera8. But in order for the "SWF Player" to work consistently in Opera7+, some javascript must be included in the body section of the content HTML pages displayed upon the opening of the frameset. Why this inclusion should work remains a mystery. Without the inclusion of the javascript in the lower frame HTMLs: a reset of the lower frames is often required before Opera 7 will display our menues in the lower frames.
In the example SWF Players, linked back to this page, some mouseOver java is used to display a single small ping. The typical use of the script produces a consistent display (The script we use is detailed on our
LogoLinks
page). But a stripped down version of that script which loads no image seems to work as well. The minimum of this particular script seems to be:
<script language="JavaScript">
<!--
function img_act(imgName) { imgon = eval(imgName + ""); document [imgName].src = imgon; }
--></script>
In tests done over a couple of months using two different computers, one with Opera7.2 and another with Opera7.5, the framesets with the mOver script included within the HTML body section of their opening content frames performed faultlessly while those without the script needed a lower frame reset about 75% of the time. In order to make a reset of the lower frames possible in case an Opera 7 user might require it, we include an "onClick event handler" for all our "root menu" entries:
startMenu('root', false, 10, 5, 23, ItemStyle, 'Parent Frame', false);
addItem('Menuname', 'mSubMenuName', 'sm:').onclick='LowerFrame.location.href="blah.htm"';