Hiermenus Go Forth, XXVI - DHTML Lab | 8 | WebReference

Hiermenus Go Forth, XXVI - DHTML Lab | 8


Hiermenus Go Forth, XXVI:
Version 4.2 - The Complete Script (Full-Window)

What to Expect

Whenever a menu's keepInWindow() method is called, a check is made to see if any part of the menu element falls outside the confines of the browser window. If such is the case the menu is repositioned so as not to be cut off. In Version 4.2, an additional final check is made. If after menu re-positioning, it is still truncated and scrolling is enabled, then the menu's enableScrolling() method is called.

This new method resizes the menu height so that the complete menu is visible and checks to see if scroll elements have been created for the specific menu. If they haven't then they are created, positioned and the bottom one is made visible. Once scroll elements have been created for a menu, they are always available. If not needed, they are hidden until they are.

If the user resizes the window while a scrollable menu is visible, the menu height is adjusted to the new window height. There is always a ten pixel margin between the edges of the scrollable menu and the browser window limits.

If a scrollable menu is hidden, and the user then resizes the window, the menu, when again made visible, will conform to the new browser height.

The above behavior is supported in IE5+ for Windows and NS6, all platforms.

NS4 Behavior

Since no page with DHTML can be resized without losing its content, the page is always re-loaded upon user window resize. Therefore, menus are scrollable and are sized correctly and display scroll elements, but there is no window-resize behavior. This is expected.

IE4 Windows / IE5 Macintosh Behavior

Scrollable elements in HM are not supported for IE4 Windows and IE5 Macintosh at this time. Several issues need to be resolved before we introduce this behavior, which we hope to do in the future.

The HM_xx_ScrollEnabled property is set internally to false conditionally for IE4Win and IE5Mac, regardless of its setting by page authors.

We'll wrap up with some final comments.

Produced by Peter Belesis and

All Rights Reserved. Legal Notices.
Created: February 04, 2002
Revised: February 04, 2002

URL: http://www.webreference.com/dhtml/column62/5.html