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

A Couple of Questions about the Overlay widget.

Expand Messages
  • Stuart Grimshaw
    I m writing a widget that will display a series of messages on the screen, similar to Outlook s new mail boxes, but subsequent new messages will be stacked on
    Message 1 of 2 , Feb 1, 2007
    • 0 Attachment
      I'm writing a widget that will display a series of messages on the
      screen, similar to Outlook's new mail boxes, but subsequent new
      messages will be stacked on the screen, rather than get queued.

      I have a div that I want to anchor the 1st overlay to, which i can do with this:

      notification.cfg.queueProperty("context", ["mainContent", "tr", "tr"]);

      which just aligns the top right corners of the overlay & the
      mainContent div, this works perfectly.

      Once I'm done with this overlay, I pop it onto a javascript array. I'm
      trying to align the next overlay to the last one, which I try and do
      like this:

      var index = notifications.length - 1;
      var contextElement = notifications[index].element;
      notification.cfg.queueProperty("context", [contextElement, "tr", "br"]);

      but this doesn't work, the new overlay just sits at the bottom of the page.

      The second question is about fading the new overlay in. If I create it
      like this:

      var notification = new YAHOO.widget.Overlay("sdlMessage" +
      notifications.length, { visible:false,
      width: "200px",
      effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.02} }
      });
      notification.render();
      notification.show();

      The overlay doesn't appear, yet if I don't bother with the container
      effect, it works fine.

      Any ideas?

      --
      -S

      Sports Photography in South Yorkshire & Derbyshire
      http://www.stuartgrimshaw.co.uk
    • Todd Kloots
      Use setProperty for setting the context configuration property at runtime rather than the queueProperty method. Regarding your effect not working: Did
      Message 2 of 2 , Feb 1, 2007
      • 0 Attachment
        Use "setProperty" for setting the "context"
        configuration property at runtime rather than the
        "queueProperty" method. Regarding your effect not
        working: Did you include the animation library?

        --- Stuart Grimshaw <stuart.grimshaw@...> wrote:

        > I'm writing a widget that will display a series of
        > messages on the
        > screen, similar to Outlook's new mail boxes, but
        > subsequent new
        > messages will be stacked on the screen, rather than
        > get queued.
        >
        > I have a div that I want to anchor the 1st overlay
        > to, which i can do with this:
        >
        > notification.cfg.queueProperty("context",
        > ["mainContent", "tr", "tr"]);
        >
        > which just aligns the top right corners of the
        > overlay & the
        > mainContent div, this works perfectly.
        >
        > Once I'm done with this overlay, I pop it onto a
        > javascript array. I'm
        > trying to align the next overlay to the last one,
        > which I try and do
        > like this:
        >
        > var index = notifications.length - 1;
        > var contextElement = notifications[index].element;
        > notification.cfg.queueProperty("context",
        > [contextElement, "tr", "br"]);
        >
        > but this doesn't work, the new overlay just sits at
        > the bottom of the page.
        >
        > The second question is about fading the new overlay
        > in. If I create it
        > like this:
        >
        > var notification = new
        > YAHOO.widget.Overlay("sdlMessage" +
        > notifications.length, { visible:false,
        > width: "200px",
        >
        >
        effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.02}
        > }
        > });
        > notification.render();
        > notification.show();
        >
        > The overlay doesn't appear, yet if I don't bother
        > with the container
        > effect, it works fine.
        >
        > Any ideas?
        >
        > --
        > -S
        >
        > Sports Photography in South Yorkshire & Derbyshire
        > http://www.stuartgrimshaw.co.uk
        >
        >
        >
        > Yahoo! Groups Links
        >
        > (Yahoo! ID required)
        >
        > mailto:ydn-javascript-fullfeatured@yahoogroups.com
        >
        >
        >
        >
        >
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.