Hi

I am trying to use Google Data tables with iui. However I am not able to see my 
Data tables. Please help.

My html is as below:
<html>
  <head>
    <script type='text/javascript' src='https://www.google.com/jsapi'></script>
    <script type='text/javascript'>
      google.load('visualization', '1', {packages:['table']});
      google.setOnLoadCallback(drawTable);
      function drawTable() {
        var data1 = new google.visualization.DataTable();
                
        data1.addColumn('string', 'Name');
        data1.addColumn('number', 'Salary');
        data1.addColumn('boolean', 'Full Time Employee');
        data1.addRows([
          ['Mike',  {v: 10000, f: '$10,000'}, true],
          ['Jim',   {v:8000,   f: '$8,000'},  false],
          ['Alice', {v: 12500, f: '$12,500'}, true],
          ['Bob',   {v: 7000,  f: '$7,000'},  true]
        ]);

        var table1 = new 
google.visualization.Table(document.getElementById('table_1'));
        table1.draw(data1, {showRowNumber: true});

                
                var opts = {sendMethod: 'xhr'};
                var query = new 
google.visualization.Query('http://localhost:8082/getstocklistconfirm?key=sizzlelist',
 opts);

                query.send(handleQueryResponse);
                
                function handleQueryResponse(response)
                {
                        alert(JSON.stringify(response)) 
                        if (response.isError()) 
                        {
                                alert('Error in query: ' + 
response.getMessage() + ' ' + response.getDetailedMessage());
                                return;
                        }


                        var data2 = response.getDataTable();
                        
                        var table2 = new 
google.visualization.Table(document.getElementById('table_2'));
                        table2.draw(data2);             

                }
      }
    </script>
  </head>

  <body>
        <div id="addstocklistconfirm" title="Watchlist Added" class="panel" 
selected="true">  
    <div id='table_1'></div>
        <br>
        <div id='table_2'></div>
  </body>
</html>

-- 
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/iphonewebdev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to