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

DataSource Problem..

Expand Messages
  • thirumala_btr
    YAHOO.example.Data= { bookorders: [ {id: po-0167 , quantity: 1 , amount: 4 , title: A Book About Nothing }, {id: po-0783 ,
    Message 1 of 4 , Aug 4 11:20 PM
    • 0 Attachment
      <script type="text/javascript">
      YAHOO.example.Data=
      {
      bookorders:
      [
      {id:"po-0167", quantity:"1", amount:"4", title:"A Book About Nothing"},
      {id:"po-0783", quantity:"4", amount:"12.12345", title:"The Meaning of Life"},
      {id:"po-0297", quantity:"2", amount:"1.25", title:"This Book Was Meant to Be Read Aloud"},
      {id:"po-1482", quantity:"6", amount:"3.5", title:"Read Me Twice"}
      ]
      }
      YAHOO.util.Event.addListener(window,"load",function(){

      var myColumnDefs=[
      {key:"id",sortable:true,resizable:true},
      {Key:"quantity",sortable:true,resizable:true},
      {Key:"amount",sortable:true,resizable:true},
      {Key:"title",sortable:true,resizable:true}
      ];
      var myDatasource=new YAHOO.util.LocalDataSource(YAHOO.example.Data.bookorders);
      myDatasource.responseType=YAHOO.util.DataSource.TYPE_JSARRAY;
      myDatasource.responseSchema={fields:["id","quantity","amount","title"]};
      var myDatatable=new YAHOO.widget.DataTable("basicmenu",myColumnDefs,myDatasource,{caption:"Datatable Caption"});
      });

      </script>

      when i run this code ..its displaying only the datatable ..with id col filled and the remaining fields are empty...

      im not getting why this is not executing properly.??

      plz help me.

      Thanks

      Rgds,
      Tiru.
    • Satyam
      Because you have changed key to Key in the last three column defs.
      Message 2 of 4 , Aug 5 12:07 AM
      • 0 Attachment
        Because you have changed key to Key in the last three column defs.

        thirumala_btr escribió:
        > <script type="text/javascript">
        > YAHOO.example.Data=
        > {
        > bookorders:
        > [
        > {id:"po-0167", quantity:"1", amount:"4", title:"A Book About Nothing"},
        > {id:"po-0783", quantity:"4", amount:"12.12345", title:"The Meaning of Life"},
        > {id:"po-0297", quantity:"2", amount:"1.25", title:"This Book Was Meant to Be Read Aloud"},
        > {id:"po-1482", quantity:"6", amount:"3.5", title:"Read Me Twice"}
        > ]
        > }
        > YAHOO.util.Event.addListener(window,"load",function(){
        >
        > var myColumnDefs=[
        > {key:"id",sortable:true,resizable:true},
        > {Key:"quantity",sortable:true,resizable:true},
        > {Key:"amount",sortable:true,resizable:true},
        > {Key:"title",sortable:true,resizable:true}
        > ];
        > var myDatasource=new YAHOO.util.LocalDataSource(YAHOO.example.Data.bookorders);
        > myDatasource.responseType=YAHOO.util.DataSource.TYPE_JSARRAY;
        > myDatasource.responseSchema={fields:["id","quantity","amount","title"]};
        > var myDatatable=new YAHOO.widget.DataTable("basicmenu",myColumnDefs,myDatasource,{caption:"Datatable Caption"});
        > });
        >
        > </script>
        >
        > when i run this code ..its displaying only the datatable ..with id col filled and the remaining fields are empty...
        >
        > im not getting why this is not executing properly.??
        >
        > plz help me.
        >
        > Thanks
        >
        > Rgds,
        > Tiru.
        >
        >
        >
        > ------------------------------------
        >
        > Yahoo! Groups Links
        >
        >
        >
        > ------------------------------------------------------------------------
        >
        >
        > No virus found in this incoming message.
        > Checked by AVG - www.avg.com
        > Version: 8.5.392 / Virus Database: 270.13.43/2281 - Release Date: 08/04/09 05:57:00
        >
        >
      • thirumala_btr
        Thank you Very much...feelin shame for that . will not repeat the same agian. rgds, Tiru.
        Message 3 of 4 , Aug 5 3:16 AM
        • 0 Attachment
          Thank you Very much...feelin shame for that . will not repeat the same agian.

          rgds,
          Tiru.

          --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
          >
          > Because you have changed key to Key in the last three column defs.
          >
          > thirumala_btr escribió:
          > > <script type="text/javascript">
          > > YAHOO.example.Data=
          > > {
          > > bookorders:
          > > [
          > > {id:"po-0167", quantity:"1", amount:"4", title:"A Book About Nothing"},
          > > {id:"po-0783", quantity:"4", amount:"12.12345", title:"The Meaning of Life"},
          > > {id:"po-0297", quantity:"2", amount:"1.25", title:"This Book Was Meant to Be Read Aloud"},
          > > {id:"po-1482", quantity:"6", amount:"3.5", title:"Read Me Twice"}
          > > ]
          > > }
          > > YAHOO.util.Event.addListener(window,"load",function(){
          > >
          > > var myColumnDefs=[
          > > {key:"id",sortable:true,resizable:true},
          > > {Key:"quantity",sortable:true,resizable:true},
          > > {Key:"amount",sortable:true,resizable:true},
          > > {Key:"title",sortable:true,resizable:true}
          > > ];
          > > var myDatasource=new YAHOO.util.LocalDataSource(YAHOO.example.Data.bookorders);
          > > myDatasource.responseType=YAHOO.util.DataSource.TYPE_JSARRAY;
          > > myDatasource.responseSchema={fields:["id","quantity","amount","title"]};
          > > var myDatatable=new YAHOO.widget.DataTable("basicmenu",myColumnDefs,myDatasource,{caption:"Datatable Caption"});
          > > });
          > >
          > > </script>
          > >
          > > when i run this code ..its displaying only the datatable ..with id col filled and the remaining fields are empty...
          > >
          > > im not getting why this is not executing properly.??
          > >
          > > plz help me.
          > >
          > > Thanks
          > >
          > > Rgds,
          > > Tiru.
          > >
          > >
          > >
          > > ------------------------------------
          > >
          > > Yahoo! Groups Links
          > >
          > >
          > >
          > > ------------------------------------------------------------------------
          > >
          > >
          > > No virus found in this incoming message.
          > > Checked by AVG - www.avg.com
          > > Version: 8.5.392 / Virus Database: 270.13.43/2281 - Release Date: 08/04/09 05:57:00
          > >
          > >
          >
        • Satyam
          I always try not to repeat myself, original errors are so much interesting.
          Message 4 of 4 , Aug 5 3:22 AM
          • 0 Attachment
            I always try not to repeat myself, original errors are so much interesting.

            thirumala_btr escribió:
            > Thank you Very much...feelin shame for that . will not repeat the same agian.
            >
            > rgds,
            > Tiru.
            >
            > --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
            >
            >> Because you have changed key to Key in the last three column defs.
            >>
            >> thirumala_btr escribió:
            >>
            >>> <script type="text/javascript">
            >>> YAHOO.example.Data=
            >>> {
            >>> bookorders:
            >>> [
            >>> {id:"po-0167", quantity:"1", amount:"4", title:"A Book About Nothing"},
            >>> {id:"po-0783", quantity:"4", amount:"12.12345", title:"The Meaning of Life"},
            >>> {id:"po-0297", quantity:"2", amount:"1.25", title:"This Book Was Meant to Be Read Aloud"},
            >>> {id:"po-1482", quantity:"6", amount:"3.5", title:"Read Me Twice"}
            >>> ]
            >>> }
            >>> YAHOO.util.Event.addListener(window,"load",function(){
            >>>
            >>> var myColumnDefs=[
            >>> {key:"id",sortable:true,resizable:true},
            >>> {Key:"quantity",sortable:true,resizable:true},
            >>> {Key:"amount",sortable:true,resizable:true},
            >>> {Key:"title",sortable:true,resizable:true}
            >>> ];
            >>> var myDatasource=new YAHOO.util.LocalDataSource(YAHOO.example.Data.bookorders);
            >>> myDatasource.responseType=YAHOO.util.DataSource.TYPE_JSARRAY;
            >>> myDatasource.responseSchema={fields:["id","quantity","amount","title"]};
            >>> var myDatatable=new YAHOO.widget.DataTable("basicmenu",myColumnDefs,myDatasource,{caption:"Datatable Caption"});
            >>> });
            >>>
            >>> </script>
            >>>
            >>> when i run this code ..its displaying only the datatable ..with id col filled and the remaining fields are empty...
            >>>
            >>> im not getting why this is not executing properly.??
            >>>
            >>> plz help me.
            >>>
            >>> Thanks
            >>>
            >>> Rgds,
            >>> Tiru.
            >>>
            >>>
            >>>
            >>> ------------------------------------
            >>>
            >>> Yahoo! Groups Links
            >>>
            >>>
            >>>
            >>> ------------------------------------------------------------------------
            >>>
            >>>
            >>> No virus found in this incoming message.
            >>> Checked by AVG - www.avg.com
            >>> Version: 8.5.392 / Virus Database: 270.13.43/2281 - Release Date: 08/04/09 05:57:00
            >>>
            >>>
            >>>
            >
            >
            >
            >
            > ------------------------------------
            >
            > Yahoo! Groups Links
            >
            >
            >
            > ------------------------------------------------------------------------
            >
            >
            > No virus found in this incoming message.
            > Checked by AVG - www.avg.com
            > Version: 8.5.392 / Virus Database: 270.13.44/2282 - Release Date: 08/04/09 18:01:00
            >
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.