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

YUI Menubar from existing markup - help

Expand Messages
  • kass_ius
    I ve managed to make the menu show and work, but I ve tried tweaking it a bit to fit my needs with no luck at all... - I can t seem to make the menu open its
    Message 1 of 5 , Jul 27, 2006
      I've managed to make the menu show and work, but I've tried tweaking
      it a bit to fit my needs with no luck at all...

      - I can't seem to make the menu open its submenu by clicking on the
      label, only by clicking on the arrow.
      - how can I make the menu close itself when the user clicks on other
      parts of the page.
      - how can I make it so when the user opens a certain menu, all other
      open menus close themselves?

      can someone please give some guidance or point me to relevant examples
      (i've been searching for it, but i cant seem to find the right one)

      thanks.
    • tj_yang2001
      ... From my own experience of customizing topnav.html, I need to 1. have firebox browse topnav.html 2. have IE browse topnav.html 3. change topnav.html as
      Message 2 of 5 , Jul 27, 2006
        --- In ydn-javascript@yahoogroups.com, "kass_ius" <kass_ius@...> wrote:
        >
        > I've managed to make the menu show and work, but I've tried tweaking
        > it a bit to fit my needs with no luck at all...
        >
        > - I can't seem to make the menu open its submenu by clicking on the
        > label, only by clicking on the arrow.
        > - how can I make the menu close itself when the user clicks on other
        > parts of the page.
        > - how can I make it so when the user opens a certain menu, all other
        > open menus close themselves?
        >
        > can someone please give some guidance or point me to relevant examples
        > (i've been searching for it, but i cant seem to find the right one)
        >

        From my own experience of customizing topnav.html, I need to
        1. have firebox browse topnav.html
        2. have IE browse topnav.html
        3. change topnav.html as little as possible at a time
        4. repeat 1. and 2.,once menu system are all ok in 1. and 2.
        do 3. again toward your final goal.

        The problem I have was I don't fully understand the syntax of
        javascript array in YUI menu.


        tj
      • kass_ius
        thanks. firebox = firefox? anyway, topnav.html is pure js, i need to use existing markup... so that won t help me :( i know what you mean, the yui menus
        Message 3 of 5 , Jul 27, 2006
          thanks.
          firebox = firefox?

          anyway, topnav.html is pure js, i need to use existing markup... so
          that won't help me :(

          i know what you mean, the yui menus syntax, configuration and general
          ease-of-use leaves much to be desired.

          --- In ydn-javascript@yahoogroups.com, "tj_yang2001" <tj_yang2001@...>
          wrote:
          >
          > --- In ydn-javascript@yahoogroups.com, "kass_ius" <kass_ius@> wrote:
          > >
          > > I've managed to make the menu show and work, but I've tried tweaking
          > > it a bit to fit my needs with no luck at all...
          > >
          > > - I can't seem to make the menu open its submenu by clicking on the
          > > label, only by clicking on the arrow.
          > > - how can I make the menu close itself when the user clicks on other
          > > parts of the page.
          > > - how can I make it so when the user opens a certain menu, all other
          > > open menus close themselves?
          > >
          > > can someone please give some guidance or point me to relevant examples
          > > (i've been searching for it, but i cant seem to find the right one)
          > >
          >
          > From my own experience of customizing topnav.html, I need to
          > 1. have firebox browse topnav.html
          > 2. have IE browse topnav.html
          > 3. change topnav.html as little as possible at a time
          > 4. repeat 1. and 2.,once menu system are all ok in 1. and 2.
          > do 3. again toward your final goal.
          >
          > The problem I have was I don't fully understand the syntax of
          > javascript array in YUI menu.
          >
          >
          > tj
          >
        • Todd Kloots
          kass_ius - Here is what you need to do: To open submenus by clicking on them: Add a click event handler to the items in your MenuBar that will open each
          Message 4 of 5 , Jul 27, 2006
            kass_ius -

            Here is what you need to do:

            To open submenus by clicking on them:

            Add a "click" event handler to the items in your
            MenuBar that will open each item's corresponding
            submenu.


            To hide submenus when the user clicks outside of them:

            1. Register each Menu instance you create with an
            OverlayManager instance (YAHOO.widget.OverlayManager)

            2. Add a "click" event handler to the document that
            will call the OverlyManager's "hideAll" method.


            I have created an example page for you:

            http://yuiblog.com/sandbox/yui/v011/examples/menu/example04.php


            For more on event handlers see the documentation:

            http://developer.yahoo.com/yui/menu/#eventsreference


            Hope that helps you. Good luck with your project.

            - Todd


            --- kass_ius <kass_ius@...> wrote:

            > I've managed to make the menu show and work, but
            > I've tried tweaking
            > it a bit to fit my needs with no luck at all...
            >
            > - I can't seem to make the menu open its submenu by
            > clicking on the
            > label, only by clicking on the arrow.
            > - how can I make the menu close itself when the user
            > clicks on other
            > parts of the page.
            > - how can I make it so when the user opens a certain
            > menu, all other
            > open menus close themselves?
            >
            > can someone please give some guidance or point me to
            > relevant examples
            > (i've been searching for it, but i cant seem to find
            > the right one)
            >
            > thanks.
            >
            >
            >
            >
            >
            >
            >
            > Yahoo! Groups Links
            >
            >
            > ydn-javascript-unsubscribe@yahoogroups.com
            >
            >
            >
            >
            >
            >
            >
          • kass_ius
            Thanks Todd. that helps a lot.
            Message 5 of 5 , Jul 30, 2006
              Thanks Todd.
              that helps a lot.

              --- In ydn-javascript@yahoogroups.com, Todd Kloots <kloots@...> wrote:
              >
              > kass_ius -
              >
              > Here is what you need to do:
              >
              > To open submenus by clicking on them:
              >
              > Add a "click" event handler to the items in your
              > MenuBar that will open each item's corresponding
              > submenu.
              >
              >
              > To hide submenus when the user clicks outside of them:
              >
              > 1. Register each Menu instance you create with an
              > OverlayManager instance (YAHOO.widget.OverlayManager)
              >
              > 2. Add a "click" event handler to the document that
              > will call the OverlyManager's "hideAll" method.
              >
              >
              > I have created an example page for you:
              >
              > http://yuiblog.com/sandbox/yui/v011/examples/menu/example04.php
              >
              >
              > For more on event handlers see the documentation:
              >
              > http://developer.yahoo.com/yui/menu/#eventsreference
              >
              >
              > Hope that helps you. Good luck with your project.
              >
              > - Todd
              >
              >
              > --- kass_ius <kass_ius@...> wrote:
              >
              > > I've managed to make the menu show and work, but
              > > I've tried tweaking
              > > it a bit to fit my needs with no luck at all...
              > >
              > > - I can't seem to make the menu open its submenu by
              > > clicking on the
              > > label, only by clicking on the arrow.
              > > - how can I make the menu close itself when the user
              > > clicks on other
              > > parts of the page.
              > > - how can I make it so when the user opens a certain
              > > menu, all other
              > > open menus close themselves?
              > >
              > > can someone please give some guidance or point me to
              > > relevant examples
              > > (i've been searching for it, but i cant seem to find
              > > the right one)
              > >
              > > thanks.
              > >
              > >
              > >
              > >
              > >
              > >
              > >
              > > Yahoo! Groups Links
              > >
              > >
              > > ydn-javascript-unsubscribe@yahoogroups.com
              > >
              > >
              > >
              > >
              > >
              > >
              > >
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.