radioButtonList
中的问题。我有两个radio
按钮,如下所示。我正在对第一个单选按钮执行AJAX
操作。
但是当我尝试点击第二个单选按钮时,第一个没有取消选中,我无法检查第二个。
<?php echo CHtml::radioButtonList( 'ck_Skill','',
array(4 => 'Professional Skill', 5 => 'Suggestion'),
array('separator' => ' ',
'onChange'=>CHtml::ajax(array('type'=>'POST', 'dataType'=>'json',"url" =>array("search/search"),
"success"=>"function(response){
$('#textfield-wrapper').html(response.data);
}",
))));?>
我在这里缺少什么?
答案 0 :(得分:0)
我认为这篇文章可以提供帮助:
http://www.yiiframework.com/wiki/110/styling-radio-buttons/
甚至这一个:http://code.dimilow.com/yii-radio-button-list-example-or-how-to-remove-the-line-break-separator/
我在代码中注意到的事情(Yii class reference):
无论如何,在下面的一个例子中,尝试取出你的javascript代码,以便更容易找出问题:
<?php echo CHtml::radioButtonList($model, 'ck_Skill',
array(4 => 'Professional Skill', 5 => 'Suggestion'),
array('separator' => ' ',
'onChange'=>CHtml::ajax(array('type'=>'POST', 'dataType'=>'json',"url" =>array("search/search"),
"success"=>"function(response){
$('#textfield-wrapper').html(response.data);
}",
))));?>