openPopup

openPopup( anchor , position , x , y , isContextMenu, attributesOverride, triggerEvent )
Return type: no return value

Opens the popup relative to a specified node at a specific location.

anchor
The popup may be either anchored to another node or opened freely. To anchor a popup to a node, supply an anchor node and set the position to a string indicating the manner in which the popup should be anchored. The anchor node does not need to be in the same document as the popup. Unanchored popups may be created by supplying null as the anchor node. The direction in which the popup is oriented depends on the direction of the anchor.
position
Possible values for position are: before_start, before_end, after_start, after_end, start_before, start_after, end_before, end_after, overlap, and after_pointer. Check Positioning of the Popup Guide for a precise description of the effect of the different values.
x, y
For an anchored popup, the x and y arguments may be used to offset the popup from its anchored position by some number, measured in CSS pixels. An unanchored popup appears at the position specified by x and y, relative to the viewport of the document containing the popup node. In this case, the position and attributesOverride arguments are ignored.
isContextMenu
The isContextMenu argument should be true for context menus and false for all other types of popups. It affects menu item highlighting; that is, while a context menu is open, menus opened earlier do not highlight or execute their items.
attributesOverride
If the attributesOverride argument is true, the position attribute on the popup node overrides the position value argument. If attributesOverride is false, the attribute is only used if the position argument is empty.
triggerEvent
The event that triggered the popup (such as a mouse click, if the user clicked something to open the popup).

Document Tags and Contributors

 Contributors to this page: Sheppy, trevorh, Enn, madarche, Rcampbell, Marsf, Mgjbot, BenoitL, Ptak82
 Last updated by: Sheppy,