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

Re: DataTable works, but not when included as dataSrc of a TabView Tab

Expand Messages
  • starvingprogrammer
    Your problem is that scripts loaded in a tab via dataSrc do not get executed. The recommendation in this scenario is to use the YUILoader
    Message 1 of 5 , Jun 1, 2008
    • 0 Attachment
      Your problem is that scripts loaded in a tab via dataSrc do not get executed.  The recommendation in this scenario is to use the YUILoader/Get Utilities per this post:  RE: [ydn-javascript] Tooltip in Tabview panel

      --- In ydn-javascript@yahoogroups.com, "Todd Wells" <ttopwells@...> wrote:
      >
      > 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
      > > >
      > >
      > >
      >
    • Satyam
      You might want to check: http://www.satyam.com.ar/yui/#TableWithDetails Satyam ... From: Todd Wells To: ydn-javascript@yahoogroups.com Sent: Sunday, June 01,
      Message 2 of 5 , Jun 5, 2008
      • 0 Attachment
        You might want to check:
         
         
        Satyam
         
        ----- Original Message -----
        Sent: Sunday, June 01, 2008 8:43 PM
        Subject: Re: [ydn-javascript] Re: DataTable works, but not when included as dataSrc of a TabView Tab

        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
        >



        Internal Virus Database is out of date.
        Checked by AVG.
        Version: 8.0.100 / Virus Database: 269.24.4/1476 - Release Date: 31/05/2008 12:25
      Your message has been successfully submitted and would be delivered to recipients shortly.