MenuManager.appendPopupMenu Member

Appends a popup to an existing popupset.

Syntax

object.appendPopupMenu(parentNode, beforeNode, menuName, id, label, attribs);

Arguments

ArgumentSummary
parentNode DOM Node to insert into
beforeNode DOM Node already contained by parentNode, to insert before
menuName
id ID of the popup to add.
label Text to use for this popup. Popup menus don't normally have labels, but we set a "label" attribute anyway, in case the host wants it for some reason. Any "&" characters will be stripped.
attribs Object containing CSS attributes to set on the element.

Returns

Remarks

See Also

Source Code

function mmgr_addpmenu (parentNode, beforeNode, menuName, id, label, attribs)
{
var document = parentNode.ownerDocument;
var popup = document.createElement ("popup");
popup.setAttribute ("id", id);
if (label)
popup.setAttribute ("label", label.replace("&", ""));
if (typeof attribs == "object")
{
for (var p in attribs)
popup.setAttribute (p, attribs[p]);
}
popup.setAttribute ("menuName", menuName);
parentNode.insertBefore(popup, beforeNode);
this.hookPopup (popup);
return popup;
}