title: TypeError: google.load is not a function when using ajax
body: <p>I am using a Google chart (termcloud) to display some data. I can get this working fine as a static feature on the page, however when I try to load the chart and its assets via ajax it just seems to keep throwing an error:</p>
  
  <pre><code>'TypeError: google.load is not a function'
  </code></pre>
  
  <p>Here is my ajax function:</p>
  
  <pre><code>$("li.contentpanel").click(function() {
  
  $("#content-panel").show();
  
  $('#content-panel').animate({
      width: '540'
  }, 500, function() {
      var dataString = 'alert=1';
      $.ajax({
      type: "POST",
      url: "&lt;?php echo site_url($topicmaplink);?&gt;",
      data: dataString,
      cache: false,
  
      success: function(html){
          $("#content-panel #inner").html(html);
      }
  }); 
  </code></pre>
  
  <p>});</p>
  
  <p>This is the page that is called:</p>
  
  <p>(JSAPI and termcloud plugin files are loaded at top of this page)</p>
  
  <pre><code>$(function() {
  
    google.load("visualization", "1");
    google.setOnLoadCallback(draw);
    function draw() {
      data = new google.visualization.DataTable();
      data.addColumn('string', 'Label');
      data.addColumn('number', 'Value');
      data.addColumn('string', 'Link');
      data.addRows(&lt;?php echo sizeof($topics);?&gt;);
      &lt;?php 
      $trans = array("ã" =&gt; "a", "³" =&gt; "3", "º" =&gt; "0", "â" =&gt; "a", 
          "¡" =&gt; ";", "'" =&gt; "", "\n" =&gt; "",'"' =&gt; '');
      shuffle($topics);
      for($j=0;$j&lt;sizeof($topics);$j++){
        $nonforeignkeyword = strtr($topics[$j]['keyword'],$trans);
        $totalnumber = $topics[$j]['occurrence'];
        echo 'data.setValue('.$j.', 0, "'.trim($nonforeignkeyword).'");';
        echo 'data.setValue('.$j.', 1, '.$totalnumber.');';
        echo 'data.setValue('.$j.', 2, "'.$partlink.'/searchterm||'.trim(rawurlencode($nonforeignkeyword)).'");';
      }
      ?&gt;
      var outputDiv = document.getElementById('cp-tmap');
      var tc = new TermCloud(outputDiv);
      tc.draw(data, null);
    }
  });
  </code></pre>
  
  <p>Even when I remove the JSAPI and termcloud js files from the page being called via ajax and place them on the same page that it is being called to the page seems to redirect to google.com and hang on a blank page.</p>
  
  <p>Does anyone know where I am going wrong here?</p>
  
  <p>Thanks in advance for the help</p>