-
Added two new global variables that affect how the ActiveMenu script operates. These variables required minor modification to the
activeMenu_init()
function: the event assigned to the headlines in the headline list now uses theactiveMenu_strEvent
variable for the event type; the active item is now set on page load using the index in theactiveMenu_intActiveItem
variable. -
The
activeMenu_init()
function was modified to enable a more accurate calculation of the story box height. This functionality was moved to the bottom of the script after the rest of the menu intialization has been completed. The calculation is also only done if theactiveMenu_bolResize2Fit
variable is set totrue
. -
The
activeMenu_init()
function was changed so that the initally viewable story is selected and made visible after the menu is fully initialized. This is done by calling theactiveMenu_change()
function and based on the value of theactiveMenu_intActiveItem
variable. This was in part necessitated by the change to the height calculation functionality. -
Modified the
activeMenu_change()
function so that it only requires a single parameter, the zero-based index of the story to highlight. Previously the function had to be passed the class associated with the story and the id associated with the headline, but since those values are set in script it was not really necessary as the index is sufficient to identify both.
1) IE seems to be producing a height calculation that may not be entirely accurate on the individual nodes of each story. This only seems to affect it, though, when a floated image isn't used on the first
DD
. This is something that will need additional investigation.2) One piece of weirdness I encountered was IE calculating the wrong height unless an
alert()
was inserted in the height calculation code. I suspect that IE may have been too slow to update the offsetHeight
value after a DT
/DD
was set to display='block'
. The alert may have been enough of a stall to allow IE to make the appropriate calculation.I decided to change the method used to do the calculation after discovering this flaw. Now this section of code uses the previously developed
activeMenu_change()
function to manage the display of each story. The list nodes are then parsed for the storySelected
class.