title: JQuery returns JSON object with 404
body: <p>I'm quite new to the whole jQuery/JSON thing but thought I would give it a go. The idea is that I am posting data to a PHP script and then returning a JSON object. This works fine on my localhost but on the web server, Firebug shows that the JSON object is being returned but I also get a 404 error.</p>
  
  <p>Any ideas where I could be going wrong?</p>
  
  <p>Javascript -</p>
  
  <pre><code>$(".vote").click(function() {
    $('#graph').empty();
    var area = $(this).attr("id");
    $.ajax({
      dataType: "json",
      type: "POST",
      url: "&lt;?php echo base_url(); ?&gt;home/vote",
      cache: false,
      data: "area=" + area,
      success: function(json) {
  
        arrayOfData = new Array(
          [json.science_graph, 'Science', '#009999'],
          [json.maths_graph, 'Maths', '#FF6600'],
          [json.ict_graph, 'ICT', '#FF0000'],
          [json.mfl_graph, 'MFL', '#FFCC00'],
          [json.dt_graph, 'Design Technology', '#33CC00'],
          [json.other_graph, 'Other Events', '#003399']
        );
        $('#graph').jqBarGraph({
          data: arrayOfData,
          barSpace: 5,
          width: 430
        });
  
      }
    });
  });
  </code></pre>
  
  <p>PHP -</p>
  
  <pre><code> if ($vote == true)
     {
      $poll = $this-&gt;ts_model-&gt;graph_poll();
  
      list($maths, $science, $ict, $dt, $mfl, $other) = $poll;
  
      echo "{";
      echo "\"science_graph\":\"".$science."\",";
      echo "\"ict_graph\":\"".$ict."\",";
      echo "\"dt_graph\":\"".$dt."\",";
      echo "\"other_graph\":\"".$other."\",";
      echo "\"mfl_graph\":\"".$mfl."\",";
      echo "\"maths_graph\":\"".$maths."\"";
      echo "}";
     }
  </code></pre>
  
  <p>Thanks in advance.</p>