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

After activating a submenu (yuimenu), moving away does not hide it

Expand Messages
  • lil_crazy_gekko
    I am using the Menu control, and it is working well. There is this one bug. When one of the main menus are hovered over, the sub menu will appear, now move
    Message 1 of 5 , Oct 2, 2006
    • 0 Attachment
      I am using the Menu control, and it is working well. There is this
      one bug.

      When one of the main menus are hovered over, the sub menu will appear,
      now move away from the main menu and the sub menu will dissapear.
      This is the desired behaviour.

      Hover over a main menu, then over a sub menu, move mouse away from sub
      menu and it will not hide itself.

      I am very new to this, so I am not sure how to fix this. Is it an
      event thing? Any ideas?

      Any help is greatly appreciated.

      Xin
    • Todd Kloots
      Xin - For now you have to implement that behavior yourself by adding your own event handlers. There are several examples that demonstrate how this can be
      Message 2 of 5 , Oct 2, 2006
      • 0 Attachment
        Xin -

        For now you have to implement that behavior yourself
        by adding your own event handlers. There are several
        examples that demonstrate how this can be
        accomplished:

        http://developer.yahoo.com/yui/examples/menu/

        - Todd

        --- lil_crazy_gekko <crazygecko@...> wrote:

        > I am using the Menu control, and it is working well.
        > There is this
        > one bug.
        >
        > When one of the main menus are hovered over, the sub
        > menu will appear,
        > now move away from the main menu and the sub menu
        > will dissapear.
        > This is the desired behaviour.
        >
        > Hover over a main menu, then over a sub menu, move
        > mouse away from sub
        > menu and it will not hide itself.
        >
        > I am very new to this, so I am not sure how to fix
        > this. Is it an
        > event thing? Any ideas?
        >
        > Any help is greatly appreciated.
        >
        > Xin
        >
        >
        >
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        > (Yahoo! ID required)
        >
        > mailto:ydn-javascript-fullfeatured@yahoogroups.com
        >
        >
        >
        >
        >
        >
        >
        >
      • lil_crazy_gekko
        Thank you for taking the time to reply. I have tried to get this working for a couple of hours now, and I m not having much luck. I am learning a lot though.
        Message 3 of 5 , Oct 3, 2006
        • 0 Attachment
          Thank you for taking the time to reply.

          I have tried to get this working for a couple of hours now, and I'm
          not having much luck. I am learning a lot though.

          I have looked at the JavaScript on my page, which I copied from
          topnavfrommarkup. I have changed the IDs names, and sub menu names to
          correspond with what I have got.

          It appears none of the events are being subscribed to. Looking at the
          code, the submenus are suppose to hide on mouseout, it also hides when
          body is clicked on. None of this is happening with my code.

          Can someone please take a look at
          http://digital-clarity.com/sandbox/payperclick.html and tell me what I
          am doing wrong?

          Much appreciation.

          Xin

          --- In ydn-javascript@yahoogroups.com, Todd Kloots <kloots@...> wrote:
          >
          > Xin -
          >
          > For now you have to implement that behavior yourself
          > by adding your own event handlers. There are several
          > examples that demonstrate how this can be
          > accomplished:
          >
          > http://developer.yahoo.com/yui/examples/menu/
          >
          > - Todd
          >
          >
        • Todd Kloots
          Xin - Looks like the problem is that you have a variable ( oCommunication ) in your script block left over from the example you copied. oCommunication is
          Message 4 of 5 , Oct 3, 2006
          • 0 Attachment
            Xin -

            Looks like the problem is that you have a variable
            ("oCommunication") in your script block left over from
            the example you copied. "oCommunication" is undefined
            and is causing a JavaScript error, which is haulting
            script execution, which is causing your menu to stop
            working.

            My guess is that you intended this line:

            oService =
            oCommunication.getItem(1).cfg.getProperty("submenu"),

            To be this:

            oService =
            oMenuBar.getItem(1).cfg.getProperty("submenu"),

            Since the "service" menu is a submenu of the root menu
            bar.

            - Todd


            --- lil_crazy_gekko <crazygecko@...> wrote:

            > Thank you for taking the time to reply.
            >
            > I have tried to get this working for a couple of
            > hours now, and I'm
            > not having much luck. I am learning a lot though.
            >
            > I have looked at the JavaScript on my page, which I
            > copied from
            > topnavfrommarkup. I have changed the IDs names, and
            > sub menu names to
            > correspond with what I have got.
            >
            > It appears none of the events are being subscribed
            > to. Looking at the
            > code, the submenus are suppose to hide on mouseout,
            > it also hides when
            > body is clicked on. None of this is happening with
            > my code.
            >
            > Can someone please take a look at
            > http://digital-clarity.com/sandbox/payperclick.html
            > and tell me what I
            > am doing wrong?
            >
            > Much appreciation.
            >
            > Xin
            >
            > --- In ydn-javascript@yahoogroups.com, Todd Kloots
            > <kloots@...> wrote:
            > >
            > > Xin -
            > >
            > > For now you have to implement that behavior
            > yourself
            > > by adding your own event handlers. There are
            > several
            > > examples that demonstrate how this can be
            > > accomplished:
            > >
            > > http://developer.yahoo.com/yui/examples/menu/
            > >
            > > - Todd
            > >
            > >
            >
            >
            >
            >
            >
            >
            >
            > Yahoo! Groups Links
            >
            >
            >
            > (Yahoo! ID required)
            >
            > mailto:ydn-javascript-fullfeatured@yahoogroups.com
            >
            >
            >
            >
            >
            >
            >
            >
          • lil_crazy_gekko
            Hi Todd, That was it! Thank you so much for your help. Xin
            Message 5 of 5 , Oct 4, 2006
            • 0 Attachment
              Hi Todd,

              That was it!

              Thank you so much for your help.

              Xin

              --- In ydn-javascript@yahoogroups.com, Todd Kloots <kloots@...> wrote:
              >
              > Xin -
              >
              > Looks like the problem is that you have a variable
              > ("oCommunication") in your script block left over from
              > the example you copied. "oCommunication" is undefined
              > and is causing a JavaScript error, which is haulting
              > script execution, which is causing your menu to stop
              > working.
              >
              > My guess is that you intended this line:
              >
              > oService =
              > oCommunication.getItem(1).cfg.getProperty("submenu"),
              >
              > To be this:
              >
              > oService =
              > oMenuBar.getItem(1).cfg.getProperty("submenu"),
              >
              > Since the "service" menu is a submenu of the root menu
              > bar.
              >
              > - Todd
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.