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

Re: [ydn-javascript] Re: target property in menu is not working with _blank

Expand Messages
  • Eric Heinemann
    That makes perfect sense. I was under the mistaken impression that the JSON data structure was automatically interpreted by Yahoo! Menu. Thanks a lot. I will
    Message 1 of 12 , Oct 4, 2006
    • 0 Attachment
      That makes perfect sense.  I was under the mistaken impression that the JSON data structure was automatically interpreted by Yahoo! Menu.

      Thanks a lot.  I will test it right away.

      -Eric

      ----- Original Message ----
      From: Todd Kloots <kloots@...>
      To: ydn-javascript@yahoogroups.com
      Sent: Wednesday, October 4, 2006 2:29:10 PM
      Subject: Re: [ydn-javascript] Re: target property in menu is not working with _blank

      Eric -

      The problem is your "onMenuBeforeShow" event handler.
      You need to modify it to suit your specific
      implementation. Currently, you are specifying the
      target in your JSON data structure, but you are not
      passing that property on to the configuration of each
      menu item that you are creating. You need to add a
      line to that handler to check for the existance of the
      "target" property in the JSON and apply it to the
      menu item's config if it is set. Something like this:

      if(oItemData. target) {
      oItemConfig. target = oItemData.target;
      }

      Make sense? I hope that helps you with your project.

      Let me know if you are still having trouble.

      - Todd

      --- Eric Heinemann <e_heinemann@ yahoo.com> wrote:

      > I changed the code to match your second example, but
      > the target value is still not working. Am I missing
      > something?
      >
      > ----- Original Message ----
      > From: Todd Kloots <kloots@yahoo- inc.com>
      > To: ydn-javascript@ yahoogroups. com
      > Sent: Wednesday, October 4, 2006 12:30:52 AM
      > Subject: Re: [ydn-javascript] Re: target property in
      > menu is not working with _blank
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      >
      > Eric -
      >
      >
      >
      > The problem is the "click" event handler that you
      > have
      >
      > added to the document. That handler needs to check
      > to
      >
      > make sure that the target of the event wasn't the
      >
      > MenuBar instance or any of its child elements. I
      >
      > created an example for you:
      >
      >
      >
      > http://yuiblog. com/sandbox/ yui/v0113/ examples/
      > menu/example03. php
      >
      >
      >
      > Alternatively you can take a look at the example for
      >
      > "Website Top Nav:"
      >
      >
      >
      > http://developer. yahoo.com/ yui/examples/
      > menu/topnavfromj s.html
      >
      >
      >
      > It demonstrate how you can get away with not having
      > to
      >
      > use theYAHOO.widget. OverlayManager class for
      >
      > collapsing submenus. It is less code.
      >
      >
      >
      > - Todd
      >
      >
      >
      > --- Eric Heinemann <e_heinemann@ yahoo.com> wrote:
      >
      >
      >
      > > Ok, now the links are not working at all. Here is
      >
      > > the site:
      >
      > >
      >
      > > http://www.agsouth. com/testyui/
      >
      > >
      >
      > > The page is normally dynamic, but I created a
      > static
      >
      > > html to display the problem. Under Online
      > Invoices
      >
      > > the Yahoo Home link is the one with the target
      >
      > > option.
      >
      > >
      >
      > > Thanks,
      >
      > >
      >
      > > Eric
      >
      > >
      >
      > > ----- Original Message ----
      >
      > > From: Todd Kloots <kloots@yahoo- inc.com>
      >
      > > To: ydn-javascript@ yahoogroups. com
      >
      > > Sent: Tuesday, October 3, 2006 12:14:01 PM
      >
      > > Subject: Re: [ydn-javascript] Re: target property
      > in
      >
      > > menu is not working with _blank
      >
      > >
      >
      > >
      >
      > >
      >
      > >
      >
      > >
      >
      > >
      >
      > >
      >
      > >
      >
      > >
      >
      > >
      >
      > >
      >
      > >
      >
      > >
      >
      > > Can you send me a URL to the code
      > sample
      >
      > > so that I can
      >
      > >
      >
      > > take a look?
      >
      > >
      >
      > >
      >
      > >
      >
      > > --- Eric Heinemann <e_heinemann@ yahoo.com> wrote:
      >
      > >
      >
      > >
      >
      > >
      >
      > > > I downloaded the most recent version and it
      > still
      >
      > > is
      >
      > >
      >
      > > > not working. It
      >
      > >
      >
      > > > is doing the exact same thing. Any ideas?
      >
      > >
      >
      > > >
      >
      > >
      >
      > > > -E
      >
      > >
      >
      > > >
      >
      > >
      >
      > > > --- In ydn-javascript@ yahoogroups. com, Todd
      >
      > > Kloots
      >
      > >
      >
      > > > <kloots@...> wrote:
      >
      >
      === message truncated ===



    Your message has been successfully submitted and would be delivered to recipients shortly.