Yii JUI Autocomplete - Pass javascript into sourceUrl
I am working on a form with 2 autocomplete widgets.  The first widget gets the company name and populates various other items on the form:
    
    <?php $this->widget('zii.widgets.jui.CJuiAutoComplete', array(
        'attribute'=>'company_name',
        'model'=>$model,
        'sourceUrl'=>array('company/aclist'),
        'options'=>array(
            'minLength'=>'2',
            'select'=>'js: function(e,u){
                $("#'.CHtml::activeId($model,'company_address').'").val(u.item.address);
                $("#'.CHtml::activeId($model,'company_phone').'").val(u.item.phone);
                $("#'.CHtml::activeId($model,'company_id').'").val(u.item.id);
            }',
        ),
        'htmlOptions'=>array(
            'size'=>45,
            'maxlength'=>45,
        ),
     ));?>

This works perfectly.  The second widget is very similar except it is meant to grab contacts associated with that company.  How do I pass the `company_id` value to the second autocomplete?

This is what I tried, but it didn't work:

    'sourceUrl'=>array(
        'company/aclist',
        array("id"=>"js:$('#".CHtml::activeId($model,'company_id')."').val();"),
    ),

Anyone have any other suggestions on how to accomplish this?
Yii JUI Autocomplete - Pass javascript into sourceUrl
===

I am working on a form with 2 autocomplete widgets.  The first widget gets the company name and populates various other items on the form:
    
    <?php $this->widget('zii.widgets.jui.CJuiAutoComplete', array(
        'attribute'=>'company_name',
        'model'=>$model,
        'sourceUrl'=>array('company/aclist'),
        'options'=>array(
            'minLength'=>'2',
            'select'=>'js: function(e,u){
                $("#'.CHtml::activeId($model,'company_address').'").val(u.item.address);
                $("#'.CHtml::activeId($model,'company_phone').'").val(u.item.phone);
                $("#'.CHtml::activeId($model,'company_id').'").val(u.item.id);
            }',
        ),
        'htmlOptions'=>array(
            'size'=>45,
            'maxlength'=>45,
        ),
     ));?>

This works perfectly.  The second widget is very similar except it is meant to grab contacts associated with that company.  How do I pass the `company_id` value to the second autocomplete?

This is what I tried, but it didn't work:

    'sourceUrl'=>array(
        'company/aclist',
        array("id"=>"js:$('#".CHtml::activeId($model,'company_id')."').val();"),
    ),

Anyone have any other suggestions on how to accomplish this?