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

Trouble adding new tabs from script within existing tabs.

Expand Messages
  • Nicholas
    I am trying to add new tabs to the tabView from within other tabs from javascript. In order to do so I am utilizing the dispatcher script from
    Message 1 of 3 , May 30, 2008
    • 0 Attachment
      I am trying to add new tabs to the tabView from within other tabs from
      javascript. In order to do so I am utilizing the dispatcher script
      from http://www.bubbling-library.com/ but I have been thus far unable
      to get the addition to work. The pertinent code is located at:
      http://pastebin.com/m59c633ad
      if somebody could render assistance with what I am attempting I would
      greatly appreciate it.
    • Nicholas
      I am trying to add new tabs to the tabView from within other tabs from javascript. In order to do so I am utilizing the dispatcher script from
      Message 2 of 3 , May 30, 2008
      • 0 Attachment
        I am trying to add new tabs to the tabView from within other tabs from
        javascript. In order to do so I am utilizing the dispatcher script
        from http://www.bubbling-library.com/ but I have been thus far unable
        to get the addition to work. The pertinent code is located at:
        http://pastebin.com/m59c633ad
        if somebody could render assistance with what I am attempting I would
        greatly appreciate it.
      • Caridy Patino
        Hello Nicholas: The problem is not related with the Dispatcher, is related with the SCOPE, the variable tabView is not global, because you are defining the
        Message 3 of 3 , May 30, 2008
        • 0 Attachment
          Hello Nicholas:

          The problem is not related with the Dispatcher, is related with the
          SCOPE, the variable "tabView" is not global, because you are defining
          the tabView object inside an anonymous function:

          (function() {
          var tabView = new YAHOO.widget.TabView();
          // ....
          })();

          So, you can not use the tabView outside that function. The solution
          here is to create a global variable for the tabview object:

          (function() {
          YAHOO.myTabView = new YAHOO.widget.TabView();
          // ....
          })();

          And then you can use YAHOO.myTabView wherever you want.

          This should solve your problem. Let me know if you need something else.

          Best Regards,
          Caridy Patino (caridy at yahoo-inc.com)

          --- In ydn-javascript@yahoogroups.com, "Nicholas" <ar1c0n2000@...> wrote:
          >
          > I am trying to add new tabs to the tabView from within other tabs from
          > javascript. In order to do so I am utilizing the dispatcher script
          > from http://www.bubbling-library.com/ but I have been thus far unable
          > to get the addition to work. The pertinent code is located at:
          > http://pastebin.com/m59c633ad
          > if somebody could render assistance with what I am attempting I would
          > greatly appreciate it.
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.