login\_view.php

I am just trying to use some jQuery to select the a drop down I have created via code igniter's form helper. I have tried different javascript statements on the browser console but keep getting "undefined" for this form element. :(

```
<?php

    //build html for company drop down
    $form_options['--'] = "--";f

    foreach ($client_list as $client) {
        $form_options[$client['co_id']] = $client['co_name'];
    }

    $js = 'id="companies"';
    echo form_dropdown('', $form_options,'', $js);

?>
<input id="login" type="submit" value="Login">

<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript">

$('#login').click(function() {
    var co_id = $(this).find('#companies').val();
    console.log(co_id);     
});

</script>

```