title: Google motion chart from dynamic csv file
body: <p>I am trying to make a web page that displays a google chart when a button is clicked. Heres the code so far</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;cfheader name="X-XSS-Protection" value="0"&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
    &lt;head&gt;
      &lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt;
      &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
   function Chart(){
   google.load("visualization", "1", {packages:["motionchart"]});
        google.setOnLoadCallback(drawChart);
        function drawChart() {
          var data = new google.visualization.DataTable();
          data.addColumn('string', 'Fruit');
          data.addColumn('date', 'Date');
          data.addColumn('number', 'Sales');
          data.addColumn('number', 'Expenses');
          data.addColumn('string', 'Location');
          data.addRows([
            ['Apples',  new Date (1988,0,1), 1000, 300, 'East'],
            ['Oranges', new Date (1988,0,1), 1150, 200, 'West'],
            ['Bananas', new Date (1988,0,1), 300,  250, 'West'],
            ['Apples',  new Date (1989,6,1), 1200, 400, 'East'],
            ['Oranges', new Date (1989,6,1), 750,  150, 'West'],
            ['Bananas', new Date (1989,6,1), 788,  617, 'West']
          ]);
          var chart = new google.visualization.MotionChart(document.getElementById('chart_div'));
  
          chart.draw(data, {width: 600, height:300});
        }
  }
      &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
   &lt;content style="float: left;"&gt;  
   &lt;div id="chart_div" style="width: 1000px; height: 500px;"&gt;&lt;/div&gt;
   &lt;/content&gt;
   &lt;input type="button" value="Chart" onclick="Chart()"/&gt;
    &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>The chart is displayed without the added code, but with the code, when the button is pressed the page goes blank and and my  tags are empty.
  P.S New to html/javascript</p>