hi,
i follow this thread that i need for create a cjuidatepicker :
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