Onchange access codeigniter function
<p>I'm trying using <code>jquery onchange</code>. Please take a look:</p>

<pre><code>&lt;script&gt;
$(document).ready(function() {
    $("#reservation").change(function() {
        var date = $("#reservation").val();
        $.ajax({
            url: '&lt;?=base_url();?&gt;home',
            type: 'POST',
            data: {date_search : date},
            success: function() {
                 location.reload();
            }
        });
    });
});
&lt;/script&gt;
</code></pre>

<p>here is my controller:</p>

<pre><code>else if(isset($date_search)){
      $data['var'] = "Range Date";
      $explode = explode('-',$date_search);
      $start_date = inggris_date($explode[0]);
      $end_date = inggris_date($explode[1]);
      $data['tgl'] = $this-&gt;modelmodel-&gt;showdata("select MONTH(tanggal) Tanggal from transaksi where (tanggal between '$start_date' and '$end_date')and outlet = '".$this-&gt;session-&gt;userdata('username')."' group by MONTH(tanggal)");
      $data['angka'] = $this-&gt;modelmodel-&gt;showdata("select TOP 12 (cash + cc + dc + flash + piutang + reject + disc50) total from transaksi where (tanggal between '$start_date' and '$end_date')and outlet = '".$this-&gt;session-&gt;userdata('username')."'");

}
$view = 'dummy';
$this-&gt;go_to($view,$data);
</code></pre>

<p>There is no problem with my query. I'm able to get the result. My question is, how do i refresh my page with the result because when i'm use <code>location.reload</code> the result back to <code>default</code>. </p>

<p>My function above is a part of my controller. Here is the fullscript of my function <a href="http://pastebin.com/i5UeypGG" rel="nofollow">http://pastebin.com/i5UeypGG</a></p>