Loading ...
Sorry, an error occurred while loading the content.

Drop Down Menu (Button Beta) problem

Expand Messages
  • Nicolas Doye
    I ve tried to write a drop-down menu (using Button s menubutton). It displays the button with the initial label, but clicking on it, doesn t show the menu.
    Message 1 of 4 , Feb 27, 2007
    • 0 Attachment
      I've tried to write a drop-down menu (using Button's menubutton). It
      displays the button with the initial label, but clicking on it,
      doesn't show the menu.

      Instead, I keep getting this error (fired at button-beta-debug.js line 1975).

      I created the menu using JavaScript (not markup) and the menu is an
      array (not a Menu object).

      From Firebug:

      this._menu has no properties
      _onClick(click clientX=0, clientY=0)
      fire()event-debug.js (line 1541)
      fireEvent("click", click clientX=0, clientY=0, undefined, undefined)
      event-debug.js (line 1866)
      (no name)(click clientX=0, clientY=0)element-beta-debu... (line 587)
      wrappedFn(click clientX=0, clientY=0)event-debug.js (line 421)
      sTitle = this._menu.cfg.getProperty("visible") ?

      From IE6:

      this._menu.cfg is null or not an object.

      Here's a snippet on how I built it:
      var startTimeMenu = [
      {text:"00:00", value:"00:00", onclick:{fn:onStartTimeMenuItemClick}},
      {text:"01:00", value:"01:00", onclick:{fn:onStartTimeMenuItemClick}},
      ...
      ];

      var startTimeMenuButton =
      new YAHOO.widget.Button( {type:"menubutton", label:"00:00",
      name:"startTimeMenuButton", menu: startTimeMenu,
      container:"startTimeMenuContainer"});

      Later on (in markup) there's a mathcing DIV statement.

      Any clues?
      nic
      --
      http://worldofnic.org
    • Todd Kloots
      I would be happy to help you debug, but can you please provide a URL to your example file? - Todd ... From: Nicolas Doye To:
      Message 2 of 4 , Feb 27, 2007
      • 0 Attachment
        I would be happy to help you debug, but can you please provide a URL to your example file?

        - Todd

        ----- Original Message ----
        From: Nicolas Doye <nic@...>
        To: ydn-javascript@yahoogroups.com
        Sent: Tuesday, February 27, 2007 7:39:41 AM
        Subject: [ydn-javascript] Drop Down Menu (Button Beta) problem

        I've tried to write a drop-down menu (using Button's menubutton). It
        displays the button with the initial label, but clicking on it,
        doesn't show the menu.

        Instead, I keep getting this error (fired at button-beta-debug.js line 1975).

        I created the menu using JavaScript (not markup) and the menu is an
        array (not a Menu object).

        >From Firebug:

        this._menu has no properties
        _onClick(click clientX=0, clientY=0)
        fire()event-debug.js (line 1541)
        fireEvent("click", click clientX=0, clientY=0, undefined, undefined)
        event-debug.js (line 1866)
        (no name)(click clientX=0, clientY=0)element-beta-debu... (line 587)
        wrappedFn(click clientX=0, clientY=0)event-debug.js (line 421)
        sTitle = this._menu.cfg.getProperty("visible") ?

        >From IE6:

        this._menu.cfg is null or not an object.

        Here's a snippet on how I built it:
        var startTimeMenu = [
        {text:"00:00", value:"00:00", onclick:{fn:onStartTimeMenuItemClick}},
        {text:"01:00", value:"01:00", onclick:{fn:onStartTimeMenuItemClick}},
        ...
        ];

        var startTimeMenuButton =
        new YAHOO.widget.Button( {type:"menubutton", label:"00:00",
        name:"startTimeMenuButton", menu: startTimeMenu,
        container:"startTimeMenuContainer"});

        Later on (in markup) there's a mathcing DIV statement.

        Any clues?
        nic
        --
        http://worldofnic.org




        Yahoo! Groups Links
      • Nicolas Doye
        Ah, it s on our intranet. I ll place a copy in a public place later. Many thanks, nic ... -- http://worldofnic.org
        Message 3 of 4 , Feb 28, 2007
        • 0 Attachment
          Ah, it's on our intranet. I'll place a copy in a public place later.

          Many thanks,
          nic

          On 27/02/07, Todd Kloots < kloots@...> wrote:

          I would be happy to help you debug, but can you please provide a URL to your example file?

          - Todd



          ----- Original Message ----
          From: Nicolas Doye <nic@...>
          To: ydn-javascript@yahoogroups.com
          Sent: Tuesday, February 27, 2007 7:39:41 AM
          Subject: [ydn-javascript] Drop Down Menu (Button Beta) problem

          I've tried to write a drop-down menu (using Button's menubutton). It
          displays the button with the initial label, but clicking on it,
          doesn't show the menu.

          Instead, I keep getting this error (fired at button-beta-debug.js line 1975).

          I created the menu using JavaScript (not markup) and the menu is an
          array (not a Menu object).

          >From Firebug:

          this._menu has no properties
          _onClick(click clientX=0, clientY=0)
          fire()event-debug.js (line 1541)
          fireEvent("click", click clientX=0, clientY=0, undefined, undefined)
          event-debug.js (line 1866)
          (no name)(click clientX=0, clientY=0)element-beta-debu... (line 587)
          wrappedFn(click clientX=0, clientY=0)event-debug.js (line 421)
          sTitle = this._menu.cfg.getProperty("visible") ?

          >From IE6:

          this._menu.cfg is null or not an object.

          Here's a snippet on how I built it:
          var startTimeMenu = [
          {text:"00:00", value:"00:00", onclick:{fn:onStartTimeMenuItemClick}},
          {text:"01:00", value:"01:00", onclick:{fn:onStartTimeMenuItemClick}},
          ...
          ];

          var startTimeMenuButton =
          new YAHOO.widget.Button( {type:"menubutton", label:"00:00",
          name:"startTimeMenuButton", menu: startTimeMenu,
          container:"startTimeMenuContainer"});

          Later on (in markup) there's a mathcing DIV statement.

          Any clues?
          nic
          --
          http://worldofnic.org

          Yahoo! Groups Links




          --
          http://worldofnic.org
        • Nicolas Doye
          Aha - schoolboy error. I d declared startTimeMenuButting inside a function (instead of in global scope). Changing that fixed it. Thanks for your time and back
          Message 4 of 4 , Mar 1, 2007
          • 0 Attachment
            Aha - schoolboy error. I'd declared startTimeMenuButting inside a function (instead of in global scope). Changing that fixed it. Thanks for your time and back to your regular broadcast.

            nic
            --
            http://worldofnic.org
          Your message has been successfully submitted and would be delivered to recipients shortly.