views:

13

answers:

0

I am trying to integrate a google spreadsheet into a google visualization using google datasource. The code that I am trying to execute is below. I am not getting an error alert or anything to output from this script.

<script type='text/javascript'>

    google.load("visualization", "1", {packages:["corechart"]});

    google.setOnLoadCallback(initialize);

    function initialize() {

        var query = new google.visualization.Query(
            'https://spreadsheets.google.om/ccc?
             key=0AtagL7TpIoPpdEV2QTZ1TzhGclhQbmNPMUp0TXdjWmc&hl=en');

       query.send(handleQueryResponse);
   }

  function handleQueryResponse(response) {

       if (response.isError()) {
          alert('Error in query: ' + response.getMessage() + ' ' +                                 
                     response.getDetailedMessage());
       return;
       }

      var data = response.getDataTable();

      var chart = new google.visualization.MotionChart(
                  document.getElementById('chart_div'));
      chart.draw(data, {width: 300, height:300});

 }        

</script>

The location of my test google spreadsheet is set to share public and published to the web.

'https://spreadsheets.google.com/ccc?
   key=0AtagL7TpIoPpdEV2QTZ1TzhGclhQbmNPMUp0TXdjWmc&hl=en'