showPopup

This article is in need of a technical review.

showPopup( element, x, y, popupType, anchor, align ) Deprecated since Gecko 1.9
Return type: no return value
Deprecated in favor of openPopup and openPopupAtScreen
Opens a popup element. There are two ways of specifying where the popup appears, either at a specific screen position, or relative to some element in the window. If either x or y are set to values, the popup will appear at the screen coordinate (x,y). If x and y are -1, the popup will be positioned relative to the element specified as the first argument. This is what you might do to show a popup below a button, for example. In this latter case, the anchor and align arguments may be used to further control where the popup appears relative to the element. The anchor argument corresponds to the popupanchor attribute on the element. The align argument corresponds to the popupalign attribute on the element. The anchor and align arguments are ignored if either x or y are not -1.
To have a popup appear relative to another element yet still offset by some number of pixels, determine the actual screen position of the element using the boxObject.screenX and boxObject.screenY properties of the element, and use those as the x and y arguments offset by the desired values.
The popupType should be either the string popup, context, or tooltip. Each type of popup is intended to be displayed only temporarily; they are not expected to be displayed permanently. Only one popup may be displayed at a time.

Document Tags and Contributors

Contributors to this page: Nc15, Sheppy, Enn, pippijn, jswisher, Marsf, trevorh, Mkmelin, Mgjbot, Ptak82, Dria
Last updated by: Sheppy,