spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / dhtml / column35
Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

Logo

Hiermenus Go Forth, I:
Version 4 - The External Arrays



Elements 1 and 2 - left_position and top_position

Description
Set the absolute page pixel position of the top-level menu in a menu tree.

Value
Pixels
May be specified as:
Example Values
integers: 100,120
integers: ,120
integers: 100,

strings: "100","120"
strings: "","120"
strings: "100",""

JS expressions: "getLeft()","getTop()"
JS expressions: "(IE4) ? ((document.body.clientWidth<800) ? 50 : 100) : ((window.innerWidth<800) ? 50 : 100)",120

Default
There are no default values for these parameters. If omitted, the top-level menu will appear at the mouse position.

Differences from Version 3 equivalent
Version 3 accepted only integer values.

Comments
The use of JS expressions will probably be very popular for the setting of these position values. Many (very many) implementations of Version 3 included workarounds to introduce this feature.

For example, the menus are required to appear next to a list of vertical links in a table. Since we know the table's left position and the width of each link, we can simply include integer values for the parameters to place the menus.

However, what if the table was centered on the page. Its left position, and consequently the required menu absolute position, would be different for every browser window width!

You can create a function that finds the correct position each time the menu needs to be displayed. Then include the function call as a string in the array.


The next two parameter-elements set the font color for the menu tree.


Produced by Peter Belesis and

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint

All Rights Reserved. Legal Notices.
Created: Aug 08, 2000
Revised: Aug 08, 2000

URL: http://www.webreference.com/dhtml/column35/8.html