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

Re: Tabview - receive notification when the currently selected tab is selected a

Expand Messages
  • stergios_marinopoulos
    Perfect! Awesome! Worked like a charm. Thanks Matt, Stergios Marinopoulos http://vlane.com
    Message 1 of 3 , Apr 2, 2008
    • 0 Attachment
      Perfect! Awesome! Worked like a charm.

      Thanks Matt,

      Stergios Marinopoulos
      http://vlane.com

      --- In ydn-javascript@yahoogroups.com, Matt Sweeney <msweeney@...> wrote:
      >
      > stergios_marinopoulos wrote:
      > > I would like to receive an event when the currently selected tab is
      > > selected again.
      > >
      > Hi Stergios,
      >
      > You can listen for the "activeChange" event at the tab level. This
      > always fires, currently active or not. Keep in mind that it also sets
      > the active state to false, so you'll have to branch on the value if you
      > are only interested in when active.
      >
      > For example:
      >
      > var onActiveChange = function(e) {
      > if (e.newValue === true) {
      > alert('tab "' + this.get('label') + '" activated');
      > }
      > };
      >
      > var tabview = new YAHOO.widget.TabView('demo');
      > YAHOO.util.Dom.batch(tabview.get('tabs'), function(tab) {
      > tab.on('activeChange', onActiveChange);
      > });
      >
      > Matt
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.