Ajaxbutton Action Dependant On Dropdown Selection

How do you pass a drop down selected value as an action in an ajaxButton?

Below is how I pass as a value, however I would like to pass the selected value from the drop down as the action name

<?php

echo CHtml::ajaxButton(Yii::t(‘default’,‘Run’),

        &#036;this-&gt;createUrl('dynamics/run'),


        array(


            'type'=&gt;'POST',


            'data'=&gt; array(


                'avalue'=&gt;'js: &#036;(&quot;#dropdownlist1 option:selected&quot;).val()',


                ),


            'update'=&gt;'#div1-html',


        )


    );

?>

I tried the following but it doesn’t work

<?php

echo CHtml::ajaxButton(Yii::t(‘default’,‘Run’),

        &#036;this-&gt;createUrl('dynamics/'.'js: &#036;(&quot;#dropdownlist1 option:selected&quot;).val()'),


        array(


            'type'=&gt;'POST',


            'update'=&gt;'#div1-html',


        )


    );

?>

try this one




<?php

 echo CHtml::ajaxButton(

  // Lable of ajax button

  'Ajax Button Request',

  // Request function in controller of yii

  array('site/create'),

  //Parameter with ajax request

  array(

    'data'=>array(

     'value'=>'js:$("#dropdownlist1").val()',

    ),

   'type'=>'POST',  

   'update'=>'#update_selector'   

   ) 

); ?>



I’m not sure how this makes any difference. Doesn’t this just call the ‘create’ action in ‘site’ controller. I want to be able to pass the value as the name of the action and not hard code it.