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

31942Re: [ydn-javascript] Re: DataTable works, but not when included as dataSrc of a TabView Tab

Expand Messages
  • Todd Wells
    Jun 1, 2008
    • 0 Attachment
      I'm not sure that you understood my scenario.  The div isn't even on the page until it's loaded by the dataSrc.  The page with the tab view doesn't contain any of the tab content -- it refers each tab to its own dataSrc page where the content actually resides.  Without the dataSrc, there is no content or target div.


      On Sun, Jun 1, 2008 at 11:33 AM, starvingprogrammer <ydn@...> wrote:

      Instead of using dataSrc, try using content containing the DataTable's target div

      tabView.addTab(new YAHOO.widget.Tab({
          label: 'mytest',
          content:'<div id="mytable"></div>'
      }));

      --- In ydn-javascript@yahoogroups.com, "Todd Wells" <ttopwells@...> wrote:
      >
      > I have a standalone page, based on the DataTable JSON
      > example<http://developer.yahoo.com/yui/examples/datatable/dt_xhrjson.html>,

      > that loads a DataTable. It initializes, like the example, by listening to
      > the window load event. This page works and displays the DataTable as
      > expected.
      >
      > However, when I refer to this page as the dataSrc for a YUI TabView Tab, the
      > page loads but the DataTable is never initialized.
      >
      > tabView.addTab( new YAHOO.widget.Tab({
      > // tab=2
      > label: 'All Outcomes',
      >
      >
      > dataSrc: "/outcomes/26",
      > cacheData: true,
      > active: false
      > }));
      >
      > I can see in firebug that there is no attempt to retrieve the JSON, and the
      > javascript on the page with the DataTable doesn't appear to ever execute.
      >
      > Is this because the javascript in the DataTable's page is initialized in the
      > window load event? I'm hoping for suggestions to get this working.y
      >

    • Show all 5 messages in this topic