[ ASK ] how to add variable in CJUI onSelect

hi,

i follow this thread that i need for create a cjuidatepicker :

http://www.yiiframework.com/forum/index.php?/topic/17237-dynamically-updating-dropdownlist-via-cjuidatepicker-solved/

this code is works :




'onSelect'=> 'js: function(dateText, inst) {'.

        CHtml::ajax(array('type'=>'POST','datatype'=>'html','url'=>array('test'), // ur controller action

                                'data'=>array('selDate'=>'js: dateText'),

                                'success'=>'function(html){

                                         var srvCombo ="'. CHtml::activeId($model, "start").'"; // replace 'start' to ur dropdown attribute

                                         $(srvCombo).html(html);

                                         return false; }',)

                        ).

        '}



but i want to add a varible ‘data’ attribute into onSelect function from input hidden in form :

i try :

‘onSelect’=> ‘js: function(dateText, inst) {’.

    CHtml::ajax(array('type'=>'POST','datatype'=>'html','url'=>array('test'), // ur controller action


                            'data'=>array('selDate'=>'js: dateText', 'user_id'=> 'js: $("#user_id").val()'),

or :

‘onSelect’=> ‘js: function(dateText, inst) {’.

    CHtml::ajax(array('type'=>'POST','datatype'=>'html','url'=>array('test'), // ur controller action


                            'data'=>array('selDate'=>'js: dateText', 'user_id'=> js: $("#user_id").val()),

#user_id is ID from input type hidden in form

<input type="hidden" value=1 name="user_id" />

it not works …

how to add another variable into this attribute

thanks

What is the id of this form


<input type="hidden" value=1 name="user_id" />

I don’t see it from your example