[ 1 post ]

kaushik gandhi

  • Username: kaushikfrnd
  • Joined: Thu Jun 28, 2012 2:11 am
  • Posts: 1
  • GitHub: kaushikfrnd
  • Gists: kaushikfrnd
  • IRC: encipher
  • Offline
  • Profile

java script csv creator code for yui 3

Post Posted: Thu Jun 28, 2012 2:18 am
+0-
i am new to yui . i have this code

Code:
YUI().use('datatable', function(Y) {
      
      // Columns must match data object property names
      var data = [ {
         'browser' : 'Blazer',
         'visits' : '20',
         'visits_precentage' : '0.7%'
      }, {
         'browser' : 'Opera Mini',
         'visits' : '30',
         'visits_precentage' : '6.2%'
      }, {
         'browser' : 'Safari',
         'visits' : '25',
         'visits_precentage' : '8.5%'
      }, {
         'browser' : 'Microsoft IE for Mobile',
         'visits' : '70',
         'visits_precentage' : '26.8%'
      }, {
         'browser' : 'Firefox Mobile',
         'visits' : '40',
         'visits_precentage' : '12.8%'
      }, {
         'browser' : 'Google Android',
         'visits' : '120',
         'visits_precentage' : '45%'
      }, ];

          table = new Y.DataTable({
         
         columns : [ {
            key : "browser",
            label : "Browser",
            width : "600"
         }, {
            key : "visits",
            label : "Impression",
            width : "600"
         }, {
            key : "visits_precentage",
            label : "Impression (%)",
            width : "600"
         } ],
         data : data,
         sortable : true
      });
         //dataTableAsCSV (table);
      table.sort({
         visits_precentage : 'desc'
      });
      table.render("#grid");
   
      //alert(table);
   });

now i want a javascript csv creator to fetch the data from the table .
  [ 1 post ]
Display posts from previous:  Sort by  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum