You are missing a ' at the name of the div inside the getElementById
('chart_div).

Best,
  Viz Kid

On Thu, Feb 25, 2010 at 5:07 PM, Matt <[email protected]> wrote:

> Hi,
>
> I am trying to load an annotated timeline in my browser from a .html
> file in Dreamweaver but only a blank screen appears. The data is
> stored in a Google spreadsheet. I also tried loading it in the Google
> Code Playground and had no luck either. Here is the code:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
> www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml";>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
> <title>Untitled Document</title>
> <script type="text/javascript" src="http://www.google.com/jsapi";>
>   </script>
>   <script type="text/javascript">
>     google.load("visualization", "1", {packages:
> ["annotatedtimeline"]});
>     google.setOnLoadCallback(initialize);
>     function initialize() {
>       var query = new google.visualization.Query(
>         'http://spreadsheets.google.com/tq?key=p0Bbv-9vLv3e9TcSbFJf-
> Wg&pub=1range=A1:B83');
>       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.AnnotatedTimeLine(document.getElementById('chart_div));
> chart.draw(data, {displayAnnotations: false});
>    }
>  </script>
>  </head>
>
>  <body>
>   <div id="chart_div" style="width: 700px; height: 240px;"></div>
>  </body>
> </html>
>
> Is there something wrong with my code? Thanks in advance.
>
> -Matt
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Visualization API" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-visualization-api%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-visualization-api?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.

Reply via email to