Q:

Submit a new request to the controller upon changing form_dropdown

I'm not sure if there is a better way of doing this than with JavaScript, but I'm trying to call a controller when the select state of a form_dropdown is changed. I don't need to change some part of my page, I need to just call the controller again with new parameters. 
I'm having the hardest time trying to do this with javascript/jquery.
Does anyone have a solution to this?
Here is my attempt...
View
<?php
echo form_label('Select day', 'days[]', '');
echo form_error('days[]'); 
$day = array( '0' => 'Monday', '1' => 'Tuesday', '2' => 'Wednesday', '3' => 'Thursday', '4' => 'Friday', '5' => 'Saturday', '6' => 'Sunday' );
echo form_dropdown('days[]', $day, '', 'id="select_day"');

$controller_uri = $this->uri->slash_segment(1).$this->uri->slash_segment(2).$this->uri->slash_segment(3).$this->uri->slash_segment(4).$this->uri->slash_segment(5);

?>

<script>
  var controller_uri = "<?php echo $controller_uri ?>";
  var select_day = document.getElementById('select_day');

  $( "select" ).change(function() {
    console.log( controller_uri ); // see what it looks like
    // add the day (final argument) to the controller
    var controller_uri = controller_uri + select_day.value;

    // How to submit this as a controller request?
  });
</script>

Thanks.

A:

Well, it seems I forgot to add the base_uri() to the beginning of the controller_uri. So just changing the line...
var controller_uri = "<?php echo base_url().$controller_uri ?>";

and then calling 
window.location = controller_uri;
// or
location.href = controller_uri;

Did the trick. 
I hope this helps someone. If you know of a better way to do this, leave your own answer. 
Thanks.  

