title: loading graph by ajax request inside a div tag of a page
body: <p>The graph I want to put is working here is the code.</p>
  
  <p>graph.php</p>
  
  <pre><code>    &lt;?php $mak="1";
      $sen="5";
      ?&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Pollution Mapper&lt;/title&gt;
      &lt;!-- Load jQuery --&gt;
      &lt;script language="javascript" type="text/javascript" 
          src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"&gt;
      &lt;/script&gt;
      &lt;!-- Load Google JSAPI --&gt;
      &lt;script type="text/javascript" src="https://www.google.com/jsapi"&gt;&lt;/script&gt;
   &lt;script type="text/javascript"&gt;
          google.load("visualization", "1", { packages: ["corechart"] });
         google.setOnLoadCallback(drawChart);
  
          function drawChart() {
              var jsonData = $.ajax({
                  type: "POST",
                  url:"json.php" ,
                  dataType: "json",
                  data: { mak: &lt;?php echo $mak; ?&gt; , sen: &lt;?php echo $sen; ?&gt; },
                  async: false,
                  success: function(){
                      alert("asd");
                  }
              }).responseText;
  
              var data = new google.visualization.DataTable($.parseJSON(jsonData));
  
  
  
              var chart = new google.visualization.AreaChart(
                          document.getElementById('Chart_div'));
              chart.draw(data);
          }
  
      &lt;/script&gt; 
  
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div id="Chart_div"&gt;&lt;/div&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>The ajax request calling the above page is </p>
  
  <pre><code>$(document).on('click', '.jqf', function () {
  
      $.ajax({  
              type: "POST",  
              url: "./graph.php",
              data: { mak: $('.makid').attr('id') , sen: $(this).attr('name') },
              success: function(){
              }
          });
          return false; 
  
  });
  </code></pre>
  
  <p>The function above is inside the index.html file. I want to load the graph in index.html file without reloading the file. How should I do it?.</p>