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

dynamicly updating menubuttons (after the fact)

Expand Messages
  • foggjacob
    I am wondering if there is a way to dynamically update a drop down menu button s options with JavaScript after the menu has long been created. I know that I
    Message 1 of 8 , May 31, 2007
    • 0 Attachment
      I am wondering if there is a way to dynamically update a drop down
      menu button's options with JavaScript after the menu has long been
      created. I know that I can use the DOM to add and remove items on the
      list (they even show up on the menu), however they lack the
      interactivity of the items that were created dynamically when the menu
      was first created (the hover effect is broken and when the item is
      clicked it does not update the text of the menu button). I am thinking
      it's something simple but I am just not coming up with it.

      I am using the third example from:
      http://developer.yahoo.com/yui/examples/button/example07.html as the
      basis of my Drop Down Menu Button.

      Thanks!

      -Jake
    • Todd Kloots
      Jake - Use the getMenu method of Button to retrieve a reference to the Menu instance and from there you can use the addItem, addItems or insertItems
      Message 2 of 8 , May 31, 2007
      • 0 Attachment
        Jake -

        Use the "getMenu" method of Button to retrieve a reference to the Menu
        instance and from there you can use the "addItem," "addItems" or
        "insertItems" methods of Menu.

        - Todd

        foggjacob wrote:
        > I am wondering if there is a way to dynamically update a drop down
        > menu button's options with JavaScript after the menu has long been
        > created. I know that I can use the DOM to add and remove items on the
        > list (they even show up on the menu), however they lack the
        > interactivity of the items that were created dynamically when the menu
        > was first created (the hover effect is broken and when the item is
        > clicked it does not update the text of the menu button). I am thinking
        > it's something simple but I am just not coming up with it.
        >
        > I am using the third example from:
        > http://developer.yahoo.com/yui/examples/button/example07.html as the
        > basis of my Drop Down Menu Button.
        >
        > Thanks!
        >
        > -Jake
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
      • foggjacob
        Thanks Todd, that seems to do the trick... EXCEPT, I am finding one buggy issue... the page loads, the drop down menu buttons initialize... if I add an item to
        Message 3 of 8 , Jun 4, 2007
        • 0 Attachment
          Thanks Todd, that seems to do the trick...

          EXCEPT, I am finding one buggy issue... the page loads, the drop down
          menu buttons initialize... if I add an item to the menu BEFORE the
          first button click (expanding the menu), the button locks and I can no
          longer click it... If I first click on the button, THEN add a menu
          item it works like a charm... here is a test case:

          http://dj4-jacob.datajoe.com/dj4/ddAdd.html

          1. click on dd menu
          2. click on the "test add" link
          3. click on the dd menu and you will see that the item is correctly added

          4. now, refresh the page (ctl+f5)
          5. click on the "test add" link
          6. click on the dd menu and you will see that it is locked up and no
          matter what you do you will not be able to view the menu.


          Please help!!! I am almost finished with my project and I have
          deadlines crawling down my back...

          -Jake


          --- In ydn-javascript@yahoogroups.com, Todd Kloots <kloots@...> wrote:
          >
          > Jake -
          >
          > Use the "getMenu" method of Button to retrieve a reference to the Menu
          > instance and from there you can use the "addItem," "addItems" or
          > "insertItems" methods of Menu.
          >
          > - Todd
          >
          > foggjacob wrote:
          > > I am wondering if there is a way to dynamically update a drop down
          > > menu button's options with JavaScript after the menu has long been
          > > created. I know that I can use the DOM to add and remove items on the
          > > list (they even show up on the menu), however they lack the
          > > interactivity of the items that were created dynamically when the menu
          > > was first created (the hover effect is broken and when the item is
          > > clicked it does not update the text of the menu button). I am thinking
          > > it's something simple but I am just not coming up with it.
          > >
          > > I am using the third example from:
          > > http://developer.yahoo.com/yui/examples/button/example07.html as the
          > > basis of my Drop Down Menu Button.
          > >
          > > Thanks!
          > >
          > > -Jake
          > >
          > >
          > >
          > >
          > > Yahoo! Groups Links
          > >
          > >
          > >
          > >
          >
        • green_jimmy_sm
          The menu has not yet been drawn to the page, so it won t work; change this to false: lazyload: true ... added ... Menu ... on the ... the menu ... thinking
          Message 4 of 8 , Jun 4, 2007
          • 0 Attachment
            The menu has not yet been drawn to the page, so it won't work; change
            this to false:
            lazyload: true


            --- In ydn-javascript@yahoogroups.com, "foggjacob" <foggjacobn@...> wrote:
            >
            > Thanks Todd, that seems to do the trick...
            >
            > EXCEPT, I am finding one buggy issue... the page loads, the drop down
            > menu buttons initialize... if I add an item to the menu BEFORE the
            > first button click (expanding the menu), the button locks and I can no
            > longer click it... If I first click on the button, THEN add a menu
            > item it works like a charm... here is a test case:
            >
            > http://dj4-jacob.datajoe.com/dj4/ddAdd.html
            >
            > 1. click on dd menu
            > 2. click on the "test add" link
            > 3. click on the dd menu and you will see that the item is correctly
            added
            >
            > 4. now, refresh the page (ctl+f5)
            > 5. click on the "test add" link
            > 6. click on the dd menu and you will see that it is locked up and no
            > matter what you do you will not be able to view the menu.
            >
            >
            > Please help!!! I am almost finished with my project and I have
            > deadlines crawling down my back...
            >
            > -Jake
            >
            >
            > --- In ydn-javascript@yahoogroups.com, Todd Kloots <kloots@> wrote:
            > >
            > > Jake -
            > >
            > > Use the "getMenu" method of Button to retrieve a reference to the
            Menu
            > > instance and from there you can use the "addItem," "addItems" or
            > > "insertItems" methods of Menu.
            > >
            > > - Todd
            > >
            > > foggjacob wrote:
            > > > I am wondering if there is a way to dynamically update a drop down
            > > > menu button's options with JavaScript after the menu has long been
            > > > created. I know that I can use the DOM to add and remove items
            on the
            > > > list (they even show up on the menu), however they lack the
            > > > interactivity of the items that were created dynamically when
            the menu
            > > > was first created (the hover effect is broken and when the item is
            > > > clicked it does not update the text of the menu button). I am
            thinking
            > > > it's something simple but I am just not coming up with it.
            > > >
            > > > I am using the third example from:
            > > > http://developer.yahoo.com/yui/examples/button/example07.html as the
            > > > basis of my Drop Down Menu Button.
            > > >
            > > > Thanks!
            > > >
            > > > -Jake
            > > >
            > > >
            > > >
            > > >
            > > > Yahoo! Groups Links
            > > >
            > > >
            > > >
            > > >
            > >
            >
          • foggjacob
            Thanks green_jimmy_sm for the suggestion! I tried that... it just locked up right from the beginning... in fact, it turns out that if I don t include
            Message 5 of 8 , Jun 4, 2007
            • 0 Attachment
              Thanks green_jimmy_sm for the suggestion! I tried that... it just
              locked up right from the beginning... in fact, it turns out that if I
              don't include "lazyload: true" the whole thing locks up as well!

              -Jake


              --- In ydn-javascript@yahoogroups.com, "green_jimmy_sm"
              <green_jimmy_sm@...> wrote:
              >
              > The menu has not yet been drawn to the page, so it won't work; change
              > this to false:
              > lazyload: true
              >
              >
              > --- In ydn-javascript@yahoogroups.com, "foggjacob" <foggjacobn@> wrote:
              > >
              > > Thanks Todd, that seems to do the trick...
              > >
              > > EXCEPT, I am finding one buggy issue... the page loads, the drop down
              > > menu buttons initialize... if I add an item to the menu BEFORE the
              > > first button click (expanding the menu), the button locks and I can no
              > > longer click it... If I first click on the button, THEN add a menu
              > > item it works like a charm... here is a test case:
              > >
              > > http://dj4-jacob.datajoe.com/dj4/ddAdd.html
              > >
              > > 1. click on dd menu
              > > 2. click on the "test add" link
              > > 3. click on the dd menu and you will see that the item is correctly
              > added
              > >
              > > 4. now, refresh the page (ctl+f5)
              > > 5. click on the "test add" link
              > > 6. click on the dd menu and you will see that it is locked up and no
              > > matter what you do you will not be able to view the menu.
              > >
              > >
              > > Please help!!! I am almost finished with my project and I have
              > > deadlines crawling down my back...
              > >
              > > -Jake
              > >
              > >
              > > --- In ydn-javascript@yahoogroups.com, Todd Kloots <kloots@> wrote:
              > > >
              > > > Jake -
              > > >
              > > > Use the "getMenu" method of Button to retrieve a reference to the
              > Menu
              > > > instance and from there you can use the "addItem," "addItems" or
              > > > "insertItems" methods of Menu.
              > > >
              > > > - Todd
              > > >
              > > > foggjacob wrote:
              > > > > I am wondering if there is a way to dynamically update a drop down
              > > > > menu button's options with JavaScript after the menu has long been
              > > > > created. I know that I can use the DOM to add and remove items
              > on the
              > > > > list (they even show up on the menu), however they lack the
              > > > > interactivity of the items that were created dynamically when
              > the menu
              > > > > was first created (the hover effect is broken and when the item is
              > > > > clicked it does not update the text of the menu button). I am
              > thinking
              > > > > it's something simple but I am just not coming up with it.
              > > > >
              > > > > I am using the third example from:
              > > > > http://developer.yahoo.com/yui/examples/button/example07.html
              as the
              > > > > basis of my Drop Down Menu Button.
              > > > >
              > > > > Thanks!
              > > > >
              > > > > -Jake
              > > > >
              > > > >
              > > > >
              > > > >
              > > > > Yahoo! Groups Links
              > > > >
              > > > >
              > > > >
              > > > >
              > > >
              > >
              >
            • foggjacob
              I did some more testing and found out some interesting things... http://dj4-jacob.datajoe.com/dj4/ddAdd2.html If you use the clearContent() method of the
              Message 6 of 8 , Jun 4, 2007
              • 0 Attachment
                I did some more testing and found out some interesting things...

                http://dj4-jacob.datajoe.com/dj4/ddAdd2.html

                If you use the "clearContent()" method of the menu object it does
                indeed clear the contents of the menu, however as soon as you click on
                the menu again it seems that it reverts back to it's original
                constructor array to repopulate the menu contents.

                Using that to my advantage I was able to add an additional item to
                that array (aProjectSelector[4] = newitem;) and execute the
                clearContent() method and successfully, (simi-)dynamically add an item
                to the dd menu without having to first initialize it.

                From there I tried to set the list to empty (aProjectSelector.length =
                0 or aProjectSelector = []) so I could repopulate it... both attempts
                resulted in the ddMenu reverting back to it's original array.

                Finally I tried to overwrite the arrays contents (aProjectSelector[0]
                = newitem) and that seemed to do the trick... however I had to
                manually set every item in the array to either a new value or an empty
                string in order for this to be successful.

                I know that I can script a for loop to iterate through the array
                setting all values to "" then add the new items, however this seems to
                be a very clunky workaround to something that should be as simple
                menu.addItem(newitem);

                you can test what I am talking about by going to the following link:

                http://dj4-jacob.datajoe.com/dj4/ddAdd2.html

                1. click on the "add by remove" link and it will change the contents
                of the menu.

                On an interesting side note, if you click one of the other test
                buttons before you click on the menu, the menu locks up as expected..
                if you then click on the "add by remove" link it modifies the array
                and clears the contents (repopulating the menu) and it magically works
                again...

                Please someone take a look at this and somehow find a solution!

                -Jacob



                --- In ydn-javascript@yahoogroups.com, "foggjacob" <foggjacobn@...> wrote:
                >
                > Thanks green_jimmy_sm for the suggestion! I tried that... it just
                > locked up right from the beginning... in fact, it turns out that if I
                > don't include "lazyload: true" the whole thing locks up as well!
                >
                > -Jake
                >
                >
                > --- In ydn-javascript@yahoogroups.com, "green_jimmy_sm"
                > <green_jimmy_sm@> wrote:
                > >
                > > The menu has not yet been drawn to the page, so it won't work; change
                > > this to false:
                > > lazyload: true
                > >
                > >
                > > --- In ydn-javascript@yahoogroups.com, "foggjacob" <foggjacobn@>
                wrote:
                > > >
                > > > Thanks Todd, that seems to do the trick...
                > > >
                > > > EXCEPT, I am finding one buggy issue... the page loads, the drop
                down
                > > > menu buttons initialize... if I add an item to the menu BEFORE the
                > > > first button click (expanding the menu), the button locks and I
                can no
                > > > longer click it... If I first click on the button, THEN add a menu
                > > > item it works like a charm... here is a test case:
                > > >
                > > > http://dj4-jacob.datajoe.com/dj4/ddAdd.html
                > > >
                > > > 1. click on dd menu
                > > > 2. click on the "test add" link
                > > > 3. click on the dd menu and you will see that the item is correctly
                > > added
                > > >
                > > > 4. now, refresh the page (ctl+f5)
                > > > 5. click on the "test add" link
                > > > 6. click on the dd menu and you will see that it is locked up and no
                > > > matter what you do you will not be able to view the menu.
                > > >
                > > >
                > > > Please help!!! I am almost finished with my project and I have
                > > > deadlines crawling down my back...
                > > >
                > > > -Jake
                > > >
                > > >
                > > > --- In ydn-javascript@yahoogroups.com, Todd Kloots <kloots@> wrote:
                > > > >
                > > > > Jake -
                > > > >
                > > > > Use the "getMenu" method of Button to retrieve a reference to the
                > > Menu
                > > > > instance and from there you can use the "addItem," "addItems" or
                > > > > "insertItems" methods of Menu.
                > > > >
                > > > > - Todd
                > > > >
                > > > > foggjacob wrote:
                > > > > > I am wondering if there is a way to dynamically update a
                drop down
                > > > > > menu button's options with JavaScript after the menu has
                long been
                > > > > > created. I know that I can use the DOM to add and remove items
                > > on the
                > > > > > list (they even show up on the menu), however they lack the
                > > > > > interactivity of the items that were created dynamically when
                > > the menu
                > > > > > was first created (the hover effect is broken and when the
                item is
                > > > > > clicked it does not update the text of the menu button). I am
                > > thinking
                > > > > > it's something simple but I am just not coming up with it.
                > > > > >
                > > > > > I am using the third example from:
                > > > > > http://developer.yahoo.com/yui/examples/button/example07.html
                > as the
                > > > > > basis of my Drop Down Menu Button.
                > > > > >
                > > > > > Thanks!
                > > > > >
                > > > > > -Jake
                > > > > >
                > > > > >
                > > > > >
                > > > > >
                > > > > > Yahoo! Groups Links
                > > > > >
                > > > > >
                > > > > >
                > > > > >
                > > > >
                > > >
                > >
                >
              • foggjacob
                Okay, I have built a complex, yet elegant workaround that will work TEMPORARLY... however I still need to find an actual fix for this issue... is this a bug?
                Message 7 of 8 , Jun 4, 2007
                • 0 Attachment
                  Okay, I have built a complex, yet elegant workaround that will work
                  TEMPORARLY... however I still need to find an actual fix for this
                  issue... is this a bug? should I submit a bug report?

                  here is the workaround

                  http://dj4-jacob.datajoe.com/dj4/ddAdd3.php

                  you can add items by entering a value and text and click the "add
                  object" link... you can remove items by entering the value and
                  clicking the "remove object" link... alternatively you can put "all"
                  as the value and it will remove all items. Other than that, I think it
                  is better explained by viewing the source... besides, I'm exhausted...
                  I have been working on this issue for the past 11 hours... maybe this
                  will help someone else in the mean time.... hopefully someone will
                  come up with some sort of permanent solution...

                  again, do I need to submit a bug report?

                  --Jacob



                  --- In ydn-javascript@yahoogroups.com, "foggjacob" <foggjacobn@...> wrote:
                  >
                  > I did some more testing and found out some interesting things...
                  >
                  > http://dj4-jacob.datajoe.com/dj4/ddAdd2.html
                  >
                  > If you use the "clearContent()" method of the menu object it does
                  > indeed clear the contents of the menu, however as soon as you click on
                  > the menu again it seems that it reverts back to it's original
                  > constructor array to repopulate the menu contents.
                  >
                  > Using that to my advantage I was able to add an additional item to
                  > that array (aProjectSelector[4] = newitem;) and execute the
                  > clearContent() method and successfully, (simi-)dynamically add an item
                  > to the dd menu without having to first initialize it.
                  >
                  > From there I tried to set the list to empty (aProjectSelector.length =
                  > 0 or aProjectSelector = []) so I could repopulate it... both attempts
                  > resulted in the ddMenu reverting back to it's original array.
                  >
                  > Finally I tried to overwrite the arrays contents (aProjectSelector[0]
                  > = newitem) and that seemed to do the trick... however I had to
                  > manually set every item in the array to either a new value or an empty
                  > string in order for this to be successful.
                  >
                  > I know that I can script a for loop to iterate through the array
                  > setting all values to "" then add the new items, however this seems to
                  > be a very clunky workaround to something that should be as simple
                  > menu.addItem(newitem);
                  >
                  > you can test what I am talking about by going to the following link:
                  >
                  > http://dj4-jacob.datajoe.com/dj4/ddAdd2.html
                  >
                  > 1. click on the "add by remove" link and it will change the contents
                  > of the menu.
                  >
                  > On an interesting side note, if you click one of the other test
                  > buttons before you click on the menu, the menu locks up as expected..
                  > if you then click on the "add by remove" link it modifies the array
                  > and clears the contents (repopulating the menu) and it magically works
                  > again...
                  >
                  > Please someone take a look at this and somehow find a solution!
                  >
                  > -Jacob
                  >
                  >
                  >
                  > --- In ydn-javascript@yahoogroups.com, "foggjacob" <foggjacobn@> wrote:
                  > >
                  > > Thanks green_jimmy_sm for the suggestion! I tried that... it just
                  > > locked up right from the beginning... in fact, it turns out that if I
                  > > don't include "lazyload: true" the whole thing locks up as well!
                  > >
                  > > -Jake
                  > >
                  > >
                  > > --- In ydn-javascript@yahoogroups.com, "green_jimmy_sm"
                  > > <green_jimmy_sm@> wrote:
                  > > >
                  > > > The menu has not yet been drawn to the page, so it won't work;
                  change
                  > > > this to false:
                  > > > lazyload: true
                  > > >
                  > > >
                  > > > --- In ydn-javascript@yahoogroups.com, "foggjacob" <foggjacobn@>
                  > wrote:
                  > > > >
                  > > > > Thanks Todd, that seems to do the trick...
                  > > > >
                  > > > > EXCEPT, I am finding one buggy issue... the page loads, the drop
                  > down
                  > > > > menu buttons initialize... if I add an item to the menu BEFORE the
                  > > > > first button click (expanding the menu), the button locks and I
                  > can no
                  > > > > longer click it... If I first click on the button, THEN add a menu
                  > > > > item it works like a charm... here is a test case:
                  > > > >
                  > > > > http://dj4-jacob.datajoe.com/dj4/ddAdd.html
                  > > > >
                  > > > > 1. click on dd menu
                  > > > > 2. click on the "test add" link
                  > > > > 3. click on the dd menu and you will see that the item is
                  correctly
                  > > > added
                  > > > >
                  > > > > 4. now, refresh the page (ctl+f5)
                  > > > > 5. click on the "test add" link
                  > > > > 6. click on the dd menu and you will see that it is locked up
                  and no
                  > > > > matter what you do you will not be able to view the menu.
                  > > > >
                  > > > >
                  > > > > Please help!!! I am almost finished with my project and I have
                  > > > > deadlines crawling down my back...
                  > > > >
                  > > > > -Jake
                  > > > >
                  > > > >
                  > > > > --- In ydn-javascript@yahoogroups.com, Todd Kloots <kloots@>
                  wrote:
                  > > > > >
                  > > > > > Jake -
                  > > > > >
                  > > > > > Use the "getMenu" method of Button to retrieve a reference
                  to the
                  > > > Menu
                  > > > > > instance and from there you can use the "addItem,"
                  "addItems" or
                  > > > > > "insertItems" methods of Menu.
                  > > > > >
                  > > > > > - Todd
                  > > > > >
                  > > > > > foggjacob wrote:
                  > > > > > > I am wondering if there is a way to dynamically update a
                  > drop down
                  > > > > > > menu button's options with JavaScript after the menu has
                  > long been
                  > > > > > > created. I know that I can use the DOM to add and remove items
                  > > > on the
                  > > > > > > list (they even show up on the menu), however they lack the
                  > > > > > > interactivity of the items that were created dynamically when
                  > > > the menu
                  > > > > > > was first created (the hover effect is broken and when the
                  > item is
                  > > > > > > clicked it does not update the text of the menu button). I am
                  > > > thinking
                  > > > > > > it's something simple but I am just not coming up with it.
                  > > > > > >
                  > > > > > > I am using the third example from:
                  > > > > > > http://developer.yahoo.com/yui/examples/button/example07.html
                  > > as the
                  > > > > > > basis of my Drop Down Menu Button.
                  > > > > > >
                  > > > > > > Thanks!
                  > > > > > >
                  > > > > > > -Jake
                  > > > > > >
                  > > > > > >
                  > > > > > >
                  > > > > > >
                  > > > > > > Yahoo! Groups Links
                  > > > > > >
                  > > > > > >
                  > > > > > >
                  > > > > > >
                  > > > > >
                  > > > >
                  > > >
                  > >
                  >
                • ajaxgames
                  I have the same problem. Any solutions? Btw, the link below no longer works, anyone have any other workarounds? Thanks! ... it ... exhausted... ... this ...
                  Message 8 of 8 , May 9, 2008
                  • 0 Attachment
                    I have the same problem. Any solutions?

                    Btw, the link below no longer works, anyone have any other
                    workarounds?


                    Thanks!

                    --- In ydn-javascript@yahoogroups.com, "foggjacob" <foggjacobn@...>
                    wrote:
                    >
                    > Okay, I have built a complex, yet elegant workaround that will work
                    > TEMPORARLY... however I still need to find an actual fix for this
                    > issue... is this a bug? should I submit a bug report?
                    >
                    > here is the workaround
                    >
                    > http://dj4-jacob.datajoe.com/dj4/ddAdd3.php
                    >
                    > you can add items by entering a value and text and click the "add
                    > object" link... you can remove items by entering the value and
                    > clicking the "remove object" link... alternatively you can put "all"
                    > as the value and it will remove all items. Other than that, I think
                    it
                    > is better explained by viewing the source... besides, I'm
                    exhausted...
                    > I have been working on this issue for the past 11 hours... maybe
                    this
                    > will help someone else in the mean time.... hopefully someone will
                    > come up with some sort of permanent solution...
                    >
                    > again, do I need to submit a bug report?
                    >
                    > --Jacob
                    >
                    >
                    >
                    > --- In ydn-javascript@yahoogroups.com, "foggjacob" <foggjacobn@>
                    wrote:
                    > >
                    > > I did some more testing and found out some interesting things...
                    > >
                    > > http://dj4-jacob.datajoe.com/dj4/ddAdd2.html
                    > >
                    > > If you use the "clearContent()" method of the menu object it does
                    > > indeed clear the contents of the menu, however as soon as you
                    click on
                    > > the menu again it seems that it reverts back to it's original
                    > > constructor array to repopulate the menu contents.
                    > >
                    > > Using that to my advantage I was able to add an additional item to
                    > > that array (aProjectSelector[4] = newitem;) and execute the
                    > > clearContent() method and successfully, (simi-)dynamically add an
                    item
                    > > to the dd menu without having to first initialize it.
                    > >
                    > > From there I tried to set the list to empty
                    (aProjectSelector.length =
                    > > 0 or aProjectSelector = []) so I could repopulate it... both
                    attempts
                    > > resulted in the ddMenu reverting back to it's original array.
                    > >
                    > > Finally I tried to overwrite the arrays contents (aProjectSelector
                    [0]
                    > > = newitem) and that seemed to do the trick... however I had to
                    > > manually set every item in the array to either a new value or an
                    empty
                    > > string in order for this to be successful.
                    > >
                    > > I know that I can script a for loop to iterate through the array
                    > > setting all values to "" then add the new items, however this
                    seems to
                    > > be a very clunky workaround to something that should be as simple
                    > > menu.addItem(newitem);
                    > >
                    > > you can test what I am talking about by going to the following
                    link:
                    > >
                    > > http://dj4-jacob.datajoe.com/dj4/ddAdd2.html
                    > >
                    > > 1. click on the "add by remove" link and it will change the
                    contents
                    > > of the menu.
                    > >
                    > > On an interesting side note, if you click one of the other test
                    > > buttons before you click on the menu, the menu locks up as
                    expected..
                    > > if you then click on the "add by remove" link it modifies the
                    array
                    > > and clears the contents (repopulating the menu) and it magically
                    works
                    > > again...
                    > >
                    > > Please someone take a look at this and somehow find a solution!
                    > >
                    > > -Jacob
                    > >
                    > >
                    > >
                    > > --- In ydn-javascript@yahoogroups.com, "foggjacob" <foggjacobn@>
                    wrote:
                    > > >
                    > > > Thanks green_jimmy_sm for the suggestion! I tried that... it
                    just
                    > > > locked up right from the beginning... in fact, it turns out
                    that if I
                    > > > don't include "lazyload: true" the whole thing locks up as well!
                    > > >
                    > > > -Jake
                    > > >
                    > > >
                    > > > --- In ydn-javascript@yahoogroups.com, "green_jimmy_sm"
                    > > > <green_jimmy_sm@> wrote:
                    > > > >
                    > > > > The menu has not yet been drawn to the page, so it won't work;
                    > change
                    > > > > this to false:
                    > > > > lazyload: true
                    > > > >
                    > > > >
                    > > > > --- In ydn-javascript@yahoogroups.com, "foggjacob"
                    <foggjacobn@>
                    > > wrote:
                    > > > > >
                    > > > > > Thanks Todd, that seems to do the trick...
                    > > > > >
                    > > > > > EXCEPT, I am finding one buggy issue... the page loads, the
                    drop
                    > > down
                    > > > > > menu buttons initialize... if I add an item to the menu
                    BEFORE the
                    > > > > > first button click (expanding the menu), the button locks
                    and I
                    > > can no
                    > > > > > longer click it... If I first click on the button, THEN add
                    a menu
                    > > > > > item it works like a charm... here is a test case:
                    > > > > >
                    > > > > > http://dj4-jacob.datajoe.com/dj4/ddAdd.html
                    > > > > >
                    > > > > > 1. click on dd menu
                    > > > > > 2. click on the "test add" link
                    > > > > > 3. click on the dd menu and you will see that the item is
                    > correctly
                    > > > > added
                    > > > > >
                    > > > > > 4. now, refresh the page (ctl+f5)
                    > > > > > 5. click on the "test add" link
                    > > > > > 6. click on the dd menu and you will see that it is locked
                    up
                    > and no
                    > > > > > matter what you do you will not be able to view the menu.
                    > > > > >
                    > > > > >
                    > > > > > Please help!!! I am almost finished with my project and I
                    have
                    > > > > > deadlines crawling down my back...
                    > > > > >
                    > > > > > -Jake
                    > > > > >
                    > > > > >
                    > > > > > --- In ydn-javascript@yahoogroups.com, Todd Kloots <kloots@>
                    > wrote:
                    > > > > > >
                    > > > > > > Jake -
                    > > > > > >
                    > > > > > > Use the "getMenu" method of Button to retrieve a reference
                    > to the
                    > > > > Menu
                    > > > > > > instance and from there you can use the "addItem,"
                    > "addItems" or
                    > > > > > > "insertItems" methods of Menu.
                    > > > > > >
                    > > > > > > - Todd
                    > > > > > >
                    > > > > > > foggjacob wrote:
                    > > > > > > > I am wondering if there is a way to dynamically update a
                    > > drop down
                    > > > > > > > menu button's options with JavaScript after the menu has
                    > > long been
                    > > > > > > > created. I know that I can use the DOM to add and
                    remove items
                    > > > > on the
                    > > > > > > > list (they even show up on the menu), however they lack
                    the
                    > > > > > > > interactivity of the items that were created
                    dynamically when
                    > > > > the menu
                    > > > > > > > was first created (the hover effect is broken and when
                    the
                    > > item is
                    > > > > > > > clicked it does not update the text of the menu
                    button). I am
                    > > > > thinking
                    > > > > > > > it's something simple but I am just not coming up with
                    it.
                    > > > > > > >
                    > > > > > > > I am using the third example from:
                    > > > > > > >
                    http://developer.yahoo.com/yui/examples/button/example07.html
                    > > > as the
                    > > > > > > > basis of my Drop Down Menu Button.
                    > > > > > > >
                    > > > > > > > Thanks!
                    > > > > > > >
                    > > > > > > > -Jake
                    > > > > > > >
                    > > > > > > >
                    > > > > > > >
                    > > > > > > >
                    > > > > > > > Yahoo! Groups Links
                    > > > > > > >
                    > > > > > > >
                    > > > > > > >
                    > > > > > > >
                    > > > > > >
                    > > > > >
                    > > > >
                    > > >
                    > >
                    >
                  Your message has been successfully submitted and would be delivered to recipients shortly.