[Project_owners] Dynamic menu help

Philip Chee philip.chee at gmail.com
Wed May 10 11:16:00 EDT 2006

On Tue, 9 May 2006 15:42:35 -0700 (PDT), Eric H. Jung wrote:

> I'm trying to dynmically build a <menu/> under a <menupopup/>. I've
> spent almost all day on this but cannot figure out what's wrong.
> After the following code is executed in the browser (via overlay or
> Ted's Real-Time XUL Editor) and the submenu is popped-up:
>   * No submenu appears
>   * Submenus throughout the browser no longer function (e.g.,
> View->Toolbars in FF or View->Show/Hide in Mozilla Suite)
>   * The browser process does not terminate when the last window is
> closed--the process must be manually killed
>   * FF sometimes crashes

Does it work if you don't have a sub-menu?
In my code I explicitly set the XUL namespace:

    var mNode = document.createElementNS(XUL_NAMESPACE, "menuitem");
    mNode.setAttribute("xRdfgroup", "true");
      for (....) {
        tNode = mNode.cloneNode(true);
        tNode.setAttribute("observes", panelAbout);

Unrelated: For some reason my function buildSidebarMenu() from which the
above snippet is taken will crash Mozilla 1.7.12 while working perfectly
fine in Seamonkey 1.0.x so YMMV.

Philip Chee <philip at aleytys.pc.my>, <philip.chee at gmail.com>
http://flashblock.mozdev.org/ http://xsidebar.mozdev.org
Guard us from the she-wolf and the wolf, and guard us from the thief,
oh Night, and so be good for us to pass.
[ ]Why are you wasting your time reading taglines?
* TagZilla 0.059

More information about the Project_owners mailing list